jQuery 1.7.2 animate功能跨浏览器Bug修补
发现jquery的animate在ie9以下会出现使用数值时会挂的bug,用以下代码可以修补这个bug:
(function ($) {
//patch jquery animation bug in ie(<9)
$.fn._animate = $.fn.animate;
$.fn.animate = function (prop, speed, easing, callback) {
for (var p in prop) {
prop[p] = prop[p].toString();
}
return this._animate(prop, speed, easing, callback);
}
})(jQuery);
//patch jquery animation bug in ie(<9)
$.fn._animate = $.fn.animate;
$.fn.animate = function (prop, speed, easing, callback) {
for (var p in prop) {
prop[p] = prop[p].toString();
}
return this._animate(prop, speed, easing, callback);
}
})(jQuery);