我正在尝试使用jquery滚动到页面底部以及点击按钮的动画。该代码在chrome中运行良好,但在firefox和Internet Explorer 11中运行意外。请帮忙。
这是我的js。
var dh=$(document).height(), dw=$(window).width(), hh=$("header").outerHeight(), fh=$("footer").outerHeight(), bw=$(".buttontodown img").attr('width');
$(".buttontodown img").on("click", function(){
$(".click2").fadeOut(1000);
$(".buttontodown").animate({
top:($("footer").offset().top-bw-20)
}, {"queue": false, "duration": 1000});
$(".buttontodown img").animate({ textIndent: 180 }, {
step: function(now,fx)
{
$(this).css({
'-webkit-transform':'rotate('+now+'deg)',
'transform':'rotate('+now+'deg)',
'-ms-transform':'rotate('+now+'deg)'});
},
duration:1000
}, {"queue": false, "duration": 1000});
$("html,body").animate({"scrollTop":$("footer").offset().top}, {"queue": false, "duration": 1000});
return false;
});