Изменения

Участник:MailGik/hilarious.js

169 байтов убрано, 17:35, 19 августа 2016
Нет описания правки
function scrollTop(){
$(window).scroll(function(e) {
//If the scroll bar at the top of more than 200 elements
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
});