2734
правки
Изменения
Нет описания правки
function scrollTop(){
$(window).scroll(function(e) {
if($(window).scrollTop()>200)
$("#scroll-top").fadeIn(300500);//In a second interval in the id=scroll-top element
else
$("#scroll-top").fadeOut(300500);//In a second interval fade out the elements of id=scroll-top
});
};
$("#scroll-top").click(function(e) {
//Return to top with second interval
$('body,html').animate({scrollTop:0},100300);
});
scrollTop();//The fade in and fade out back to the top element
});