File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/forestecolodge.com/js/scrollToTop.min.js
Back
/*! jQuery scrollToTop - v0.3.1 - 2014-05-07 * https://github.com/amazingSurge/jquery-scrollToTop * Copyright (c) 2014 amazingSurge; Licensed GPL */ !function(a,b,c,d){"use strict";var e=function(f){this.$doc=c("body"),this.options=c.extend(e.defaults,f);var g=this.options.namespace;null===this.options.skin&&(this.options.skin="default"),this.classes={skin:g+"_"+this.options.skin,trigger:g,animating:g+"_animating",show:g+"_show"},this.disabled=!1,this.useMobile=!1,this.isShow=!1;var h=this;c.extend(h,{init:function(){h.transition=h.transition(),h.build(),h.options.target?"number"==typeof h.options.target?h.target=h.options.target:"string"==typeof h.options.target&&(h.target=Math.floor(c(h.options.target).offset().top)):h.target=0,h.$trigger.on("click.scrollToTop",function(){return h.$doc.trigger("ScrollToTop::jump"),!1}),h.$doc.on("ScrollToTop::jump",function(){if(!h.disabled){h.checkMobile();var b,d;if(h.useMobile?(b=h.options.mobile.speed,d=h.options.mobile.easing):(b=h.options.speed,d=h.options.easing),h.$doc.addClass(h.classes.animating),!h.transition.supported)return void c("html, body").stop(!0,!1).animate({scrollTop:h.target},b,function(){h.$doc.removeClass(h.classes.animating)});var e=c(a).scrollTop();h.$doc.css({"margin-top":-e+h.target+"px"}),c(a).scrollTop(h.target),h.insertRule(".duration_"+b+"{"+h.transition.prefix+"transition-duration: "+b+"ms;}"),h.$doc.addClass("easing_"+d+" duration_"+b).css({"margin-top":""}).one(h.transition.end,function(){h.$doc.removeClass(h.classes.animating+" easing_"+d+" duration_"+b)})}}).on("ScrollToTop::show",function(){h.isShow||(h.isShow=!0,h.$trigger.addClass(h.classes.show))}).on("ScrollToTop::hide",function(){h.isShow&&(h.isShow=!1,h.$trigger.removeClass(h.classes.show))}).on("ScrollToTop::disable",function(){h.disabled=!0,h.$doc.trigger("ScrollToTop::hide")}).on("ScrollToTop::enable",function(){h.disabled=!1,h.toggle()}),c(a).on("scroll",h._throttle(function(){h.disabled||h.toggle()},h.options.throttle)),h.options.mobile&&c(a).on("resize",h._throttle(function(){h.disabled||h.checkMobile()},h.options.throttle)),h.toggle()},checkMobile:function(){var b=c(a).width();h.useMobile=b<h.options.mobile.width?!0:!1},build:function(){h.$trigger=h.options.trigger?c(h.options.trigger):c('<a href="#" class="'+h.classes.trigger+" "+h.classes.skin+'">'+h.options.text+"</a>").appendTo(c("body")),h.insertRule("."+h.classes.show+"{"+h.transition.prefix+"animation-duration: "+h.options.animationSpeed+"ms;"+h.transition.prefix+"animation-name: "+h.options.namespace+"_"+h.options.animation+";}"),h.options.mobile&&h.insertRule("@media (max-width: "+h.options.mobile.width+"px){."+h.classes.show+"{"+h.transition.prefix+"animation-duration: "+h.options.mobile.animationSpeed+"ms !important;"+h.transition.prefix+"animation-name: "+h.options.namespace+"_"+h.options.mobile.animation+" !important;}}")},can:function(){var b;return b=h.useMobile?h.options.mobile.distance:h.options.distance,c(a).scrollTop()>b?!0:!1},toggle:function(){h.$doc.trigger(h.can()?"ScrollToTop::show":"ScrollToTop::hide")},transition:function(){var c,e,f="",g=!1,h=b.createElement("fakeelement"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionend",transition:"transitionend"};for(c in i)if(h.style[c]!==d){e=i[c],g=!0;break}return/(WebKit)/i.test(a.navigator.userAgent)&&(f="-webkit-"),{prefix:f,end:e,supported:g}},insertRule:function(a){if(!h.rules||!h.rules[a])if(h.rules===d?h.rules={}:h.rules[a]=!0,b.styleSheets&&b.styleSheets.length)b.styleSheets[0].insertRule(a,0);else{var c=b.createElement("style");c.innerHTML=a,b.head.appendChild(c)}},_throttle:function(a,b){var c,d,e,f=Date.now||function(){return(new Date).getTime()},g=null,h=0,i=function(){h=f(),g=null,e=a.apply(c,d),c=d=null};return function(){var j=f(),k=b-(j-h);return c=this,d=arguments,0>=k?(clearTimeout(g),g=null,h=j,e=a.apply(c,d),c=d=null):g||(g=setTimeout(i,k)),e}}}),this.init()};e.defaults={distance:200,speed:1e3,easing:"linear",animation:"fade",animationSpeed:500,mobile:{width:768,distance:100,speed:1e3,easing:"easeInOutElastic",animation:"slide",animationSpeed:200},trigger:null,target:null,text:"Scroll To Top",skin:null,throttle:250,namespace:"scrollToTop"},e.prototype={constructor:e,jump:function(){this.$doc.trigger("ScrollToTop::jump")},disable:function(){this.$doc.trigger("ScrollToTop::disable")},enable:function(){this.$doc.trigger("ScrollToTop::enable")},destroy:function(){this.$trigger.remove(),this.$doc.data("ScrollToTop",null),this.$doc.off("ScrollToTop::enable").off("ScrollToTop::disable").off("ScrollToTop::jump").off("ScrollToTop::show").off("ScrollToTop::hide")}},c.fn.scrollToTop=function(a){if("string"==typeof a){var b=a,f=arguments.length>1?Array.prototype.slice.call(arguments,1):d;return this.each(function(){var a=c.data(this,"scrollToTop");a&&"function"==typeof a[b]&&a[b].apply(a,f)})}return this.each(function(){var b=c.data(this,"scrollToTop");b||(b=new e(a),c.data(this,"scrollToTop",b))})}}(window,document,jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings