id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,blockedby,blocking 10539,animate() might cause error in IE6-8,abiao.chen,,"On IE 6-8, some page will throw an error when calling {{{ $(""ul"").animate({""left"":""0%""}, 500) }}} After debugging, I found the animate() function(For 1.6.4, Line8286-8288) will compute start value by moving the element and testing the pixelLeft attribute. {{{ jQuery.style( this, p, (end || 1) + unit); start = ((end || 1) / e.cur()) * start; jQuery.style( this, p, start + unit); }}} The first line will call {{{ elem.style[""left""]=""1%"" }}} to set the elem position. In IE6-8, this might NOT modify the pixelLeft attribute, for example the width of the containing block is 0. Thus, the e.cur() in the second line returns 0, and start value becomes NaN, which causes error in the later step( for 1.6.4, Line 8296). For better robustness, I suggest to test the e.cur() return value in the second line, likes: {{{ start = (e.cur() == 0) ? 0 : ((end || 1) / e.cur()) * start; }}} here is the test HTML. {{{ Page Title click
}}} ",bug,closed,low,1.8,effects,1.6.4,fixed,,,,