Изменения

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

1031 байт убрано, 16:19, 29 января 2017
Нет описания правки
/* Добавляет кнопку "Вверх" слева */ var snowId = documentmw.getElementById("footer");var solfId = documentloader.createElementusing("a");solfId'jquery.setAttribute("id","gotop");solfId.setAttribute("title"tipsy',"Back to top");snowId.appendChild(solfId); function goTop(){ $(window).scroll(function(e) {//If the scroll bar at the top of more than 200 elements if($(window).scrollTop()>200) $("#gotop").fadeIn(100);//In a second interval in the id=gotop element else $("#gotop").fadeOut(100);//In a second interval fade out the elements of id=gotop });};$(function(){ //Click back on top of the elements $("#gotop")'.click(function(e) { //Return to top with second interval $('body,htmltooltip').animatetipsy({scrollTop:0},100); }); $("#gotop").mouseover(function(e) { $(this).css("background","url(httpgravity://localhost/images/backtop.gif) no-repeat 0px -100px"); }); $("#gotop").mouseout(function(e) { $(this)fn.css("background","url(http://localhost/images/backtoptipsy.gif) no-repeat 0px 0px"); autoNS}); goTop();//The fade in and fade out back to the top element});