Search code examples
jqueryslidetoggle

Jquery slideToggle slides existing content, but makes target just toggle


I have a div that is hidden when a page loads, but when you click a link, it should slide vertically, pushing the rest of the content on the page down to make space. This works fine in webkit, but in Firefox (v12, Mac) and IE7 on XP (and perhaps IE8 on Vista), the existing content slides properly, but the div in question simply appears like I applied a toggle function to it, instead of the nice animation.

I tried specifically adding a height to the div, both in JS and then in CSS, but neither worked.

How can I make the new div (#div-more) slide in, instead of just appearing?


Solution

  • I forgot I posted this, but the solution was that I was trying to apply slideToggle to a form, which apparently didn't work in Firefox.