当前位置: 动力学知识库 > 问答 > 编程问答 >

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?

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: