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.
精彩评论