开发者

Jquery toggle flickering in IE7 when navigating the website

开发者 https://www.devze.com 2023-03-29 00:55 出处:网络
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

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


When doing animation with the parameterized list like your doing { left:"+=235px ..."} I found that it helps to put a position: 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号