I’m working on a new website, where I have a contact ‘tab’ coming from the top of the browser window. Here’s the link: http://www.stefanhagen.nl/testlab/. If you click the tab, a contact form will appear (using slideToggle). But while the contact form appears, I want the tab to slide down with the contact form, as if the user ‘pulls’ the form inside the browser window. I now use slideToggle to show the contact form on clicking the tab. Where do I put the code to animate the tab itself? By the way: I have a liquid layout, so the tab isn’t ‘pushed down’ like normal, because I use absolute positioning for every div. Thanx in advance, and here’s my JQuery so far:
$('div.contacttab').click(function(){
$('div.contactform').slideToggle('slow', function(){
});
I would suggest placing the contact tab into the same container div as the form then positioning it off page (with only the contact tab showing) then sliding it into view when clicked so that they move together like this:
I hope this helps!