web/assets/js/dist/_commons/back-to-top.min.js

1 line
271 B
JavaScript
Raw Normal View History

2019-09-30 15:38:41 +03:00
$(window).scroll(function(){if($(this).scrollTop()>50&&$("#sidebar-trigger").css("display")=="none"){$("#back-to-top").fadeIn()}else{$("#back-to-top").fadeOut()}});$(function(){$("#back-to-top").click(function(){$("body,html").animate({scrollTop:0},800);return false})});