attr('style', ''),IE8不兼容。使用removeAttr('style')
<a href="javascript:void(0)"></a>,IE6下JS的跳转提交会失效
Ticket #7287 (closed bug: duplicate)
http://bugs.jquery.com/ticket/7287
Remove patch for very early versions of Opera 9 that made it impossib…
https://github.com/jquery/jquery/commit/4eeae8b0bc789ad525e98568cffb37b04b27ae84
<!doctype html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> #box1 { width: 320px; height: 100px; overflow: hidden; } #box2 { width: 3200000px; height: 90px; background-color: #f00; border-top: 5px dotted #000; border-bottom: 5px dotted #000; } </style> </head> <body> <div id="box1"> <div id="box2" style="margin-left:-10880px;"></div> </div> <script src="http://static01.baomihua.com/js/lib/jquery-1.4.4.min.js?t=20120926.js"></script> <script> $('#box2').css('margin-left', '-10880px').animate({'marginLeft': '-11840px'}, 10000) // margin-left数值太大,动画从margin-left:0开始 </script> </body> </html>