|
|
| (не показано 28 промежуточных версий этого же участника) |
| Строка 1: |
Строка 1: |
| − | /* Добавляет кнопку "Вверх" слева */
| + | mw.loader.using( 'jquery.tipsy', function () { |
| − | | + | $('.tooltip').tipsy({gravity: $.fn.tipsy.autoNS}); |
| − | var footerId = document.getElementById("footer");
| + | } ); |
| − | var scrollTopId = document.createElement("a");
| |
| − | scrollTopId.setAttribute("class","scroll-top hide-scroll-top");
| |
| − | scrollTopId.setAttribute("title","Наверх");
| |
| − | footerId.appendChild(scrollTopId);
| |
| − | | |
| − | $(document).ready(function() {
| |
| − | $(".scroll-top").each(function() {
| |
| − | var t, e;
| |
| − | return (t = $(this)).hide().removeClass("hide-scroll-top"),
| |
| − | e = 0,
| |
| − | $(window).scroll(function() {
| |
| − | return t[$(this).scrollTop() > 0 ? "fadeIn" : "fadeOut"](300)
| |
| − | }),
| |
| − | t.find(".scroll-top-img").click(function() {
| |
| − | var t;
| |
| − | return t = $(window),
| |
| − | t.scrollTop() > 0 && (e = t.scrollTop(),
| |
| − | $("body,html").animate({
| |
| − | scrollTop: 0
| |
| − | }, 400)),
| |
| − | !1
| |
| − | });
| |
| − | });
| |
| − | });
| |
| − | | |
| − | /*function scrollTop(){
| |
| − | $(window).scroll(function(e) {
| |
| − | if($(window).scrollTop()>0)
| |
| − | $("#scroll-top").fadeIn(300);
| |
| − | else
| |
| − | $("#scroll-top").fadeOut(300);
| |
| − | });
| |
| − | };
| |
| − | $(function(){
| |
| − | $("#scroll-top").click(function(e) {
| |
| − | $('body,html').animate({scrollTop:0},300);
| |
| − | });
| |
| − | scrollTop();
| |
| − | });*/ | |