$(".back-to-top a").on("click",function(e){e.preventDefault();if($("html").scrollTop()<=0){$("body").animate({scrollTop:0},2000);}else{$("html").animate({scrollTop:0},2000);}});