Hi all,
In another thread where another mentor and I have been discussing the responsive design for my website, I am now working on the sign up box at the bottom of the page.
The idea I have I should be able to describe without drawing an image to convey the concept. Once the user interacts with the e-mail submission box and submits a valid e-mail (I’ve already written the jQuery/PHP validation scripts - thx, fretburner, for your past help with that), the first e-mail box content within the .signupbox div would be replaced by the slightly longer confirmation submission form where I will attempt to collect scant bits of data like country, age range, etc. The .signupbox will have to expand in height to accommodate all of that form’s content. That div has no height set to it and has a total height of 300 px, which should be enough. I would like to animate the .signupbox height transitions as the user interacts with the form. After the second form has been successfully submitted, I envision that the second form content would “disappear” just like the first one did, making way for a “thank you, user@gmail.com, for signing up…”, and the .signupbox would shrink back to its original height.
There are a number of obstacles that I need to strategize for. Since .signupbox has no height value, what is an animation I can use to bring the transitions to light? Could I just “ease” the transitions like moving objects/tweening/etc? The other question is about the HTML markup. Should all the form markup be included in the DOM, or should J/S be used to dynamically insert new HTML content as the user goes along?
Thanks, Sitepoint. Look forward to discussing this soon.
-Tyler
edit: I am looking through the jQuery API, and I see a generic function, .animate(). Can I apply some sort of CSS, and would this work in some way?