IE9 中的 jQuery SlideDown - 动画完成后内容消失

发布于 2024-09-30 03:09:25 字数 431 浏览 2 评论 0原文

我在两个不同的网站上两次遇到过这个问题。它适用于 IE9 以外的所有浏览器。

我有一个使用jquery SlideUp 和SlideDown 打开和关闭的div(同样的问题也发生在slideToggle 上)。当 div 向下滑动时,我可以看到它的内容,但是一旦动画停止,内容就会消失。

这是此问题的示例 http://www.ohnuts.com/searchResults .cfm?criteria=cashews&search=all 单击“更多类别”链接。

有其他人遇到过这个问题吗?有什么解决方法吗?我可以将其更改为仅执行简单的显示/隐藏,效果很好,但我想保持它打开的效果。

I've had this problem twice on two different sites. It works in all browsers other than IE9.

I have a div being opened and closed using jquery slideup and slideDown (the same problem happens with slideToggle). I'm able to see the content of the div as it slides down, but as soon as the animation stops, the content disappears.

Heres an example of this problem http://www.ohnuts.com/searchResults.cfm?criteria=cashews&search=all click on the "more categories" link.

Has anyone else experienced this problem, and are there any workarounds? I can change it to just do a simple show/hide, that works fine, but i'd like to keep the effect of it opening.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

那请放手 2024-10-07 03:09:25

尼克的回答竖起两个大拇指。

但当 IE 团队解决问题时,您可能会从事另一个项目。

以下是对 IE7 有效的方法,当然也适用于 IE9。

在 DIV 上设置 SlideDown 效果,将其添加到 CSS 中:

 overflow: hidden;

美好的一天!

2 thumbs up with Nick's answer.

But by the time IE team will solve the problem, you will probably be on another project.

Here is what worked for me with IE7 that will certainly works on IE9.

On the DIV you set a slideDown effect, add this to your CSS:

 overflow: hidden;

Good day!

总攻大人 2024-10-07 03:09:25

诚实的建议,不要修复它将其作为错误报告给 IE9 团队,但不要花任何时间修复他们的错误

这个问题应该在 IE9 Final 中得到修复,最终的结果只是浪费你的开发时间...测试版是有缺陷的,它们一直都是有缺陷的,并且将永远是有缺陷的...否则它们不会被称为测试版。

Honest suggestion here, don't fix it, report it as a bug to the IE9 team but don't spend any time fixing their bug.

This should be fixed in IE9 final, and the end result will just be wasted development time on your end...betas are buggy, they've always been buggy and will always be buggy...they wouldn't be called betas otherwise.

司马昭之心 2024-10-07 03:09:25

我注意到这种情况发生在 iPad iOS 版本 5.0 的移动 Safari 中。 position:relative 是所有列表项元素的罪魁祸首。 overflow:hidden 确实解决了这个问题,但是如果您有第三层导航,这没有帮助。除了将 slideToggle 更改为 showToggle 之外,没有已知的解决方法。

I've noticed that this happens on iPad iOS ver 5.0 in mobile Safari. position:relative is the culprit on all list item elements. overflow:hidden does fix this, however this does not help if you have a 3rd tier of navigation. No known workaround except change the slideToggle to showToggle.

私藏温柔 2024-10-07 03:09:25

还有一种解决方案,就是将 .css('zoom') 添加到 jQuery 链中。

There is also one more solution to this, which is to add .css('zoom') to the jQuery chain.

隔岸观火 2024-10-07 03:09:25

我在 IE 中遇到了同样的问题,我在滑动元素的 css 中添加了以下代码:

zoom: 1;

I had the same problem with IE, and I added to the css of the sliding element the following code:

zoom: 1;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文