浏览网站时,Jquery 在 IE7 中切换闪烁
我用 jquery 创建了一个切换,但每次我在 IE 7 中浏览网站时它都会闪烁???
jQuery.noConflict(); // start substituting $ for jQuery
jQuery(document).ready(function( ) {
jQuery('#loginToggle').hide();
jQuery('#login img').toggle(
function() {
jQuery('#loginToggle').slideToggle(200);
jQuery('#info').animate({ left:"-=235px", width: "420px"},"fast");
},
function() {
jQuery('#loginToggle').slideToggle(200);
jQuery('#info').animate({ left:"+=235px", width: "420px"},"fast");
}
); // end toggle
});
谢谢
I created a toggle with jquery but it is flickering every time i navigate the website in IE 7???
jQuery.noConflict(); // start substituting $ for jQuery
jQuery(document).ready(function( ) {
jQuery('#loginToggle').hide();
jQuery('#login img').toggle(
function() {
jQuery('#loginToggle').slideToggle(200);
jQuery('#info').animate({ left:"-=235px", width: "420px"},"fast");
},
function() {
jQuery('#loginToggle').slideToggle(200);
jQuery('#info').animate({ left:"+=235px", width: "420px"},"fast");
}
); // end toggle
});
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当像您一样使用参数化列表进行动画时
{ left:"+=235px ..."}
我发现它有助于放置position: wpx xpx ypx zpx;
在您尝试设置动画的元素上。这样,jquery 可以修改的元素上实际上已经有了一个 css 样式...我认为 IE 确实有这个问题。
When doing animation with the parameterized list like your doing
{ left:"+=235px ..."}
I found that it helps to put aposition: wpx xpx ypx zpx;
on the element that you're trying to animate.That way there is actually a css style already on the element that jquery can modify... I think IE did have a problem with that.