Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/backstretch.themify-version.min.js
Назад
/*v2.0.4*/ !function(t,i,e){t.fn.tb_backstretch=function(s,o){return void 0!==o&&(void 0===o.mode&&(void 0!==i.themifyScript&&i.themifyScript.backgroundMode?o.mode=themifyScript.backgroundMode:void 0!==i.themifyVars&&i.themifyVars.backgroundMode&&(o.mode=themifyVars.backgroundMode)),void 0===o.position&&(void 0!==i.themifyScript&&i.themifyScript.backgroundPosition&&i.themifyScript.backgroundPosition?o.position=i.themifyScript.backgroundPosition:void 0!==i.themifyVars&&i.themifyVars.backgroundPosition&&i.themifyVars.backgroundPosition&&(o.position=i.themifyVars.backgroundPosition)),void 0===o.is_first&&(o.is_first=!0)),(s===e||0===s.length)&&t.error("No images were supplied for Backstretch"),0===t(i).scrollTop()&&i.scrollTo(0,0),this.each(function(){var i=t(this),e=i.data("tb_backstretch");if(e){if("string"==typeof s&&"function"==typeof e[s])return void e[s](o);o=t.extend(e.options,o),e.destroy(!0)}e=new n(this,s,o),i.data("tb_backstretch",e)})},t.tb_backstretch=function(i,e){return t("body").tb_backstretch(i,e).data("tb_backstretch")},t.expr[":"].tb_backstretch=function(i){return t(i).data("tb_backstretch")!==e},t.fn.tb_backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0,mode:"",position:""};var s={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},o={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},n=function(e,o,n){for(var a in this.options=t.extend({},t.fn.tb_backstretch.defaults,n||{}),this.images=t.isArray(o)?o:[o],this.images)t("<img />")[0].src=void 0!==this.images[a].url?this.images[a].url:this.images[a];this.isBody=e===document.body,this.$container=t(e),this.$root=this.isBody?t(r?i:document):this.$container,e=this.$container.children(".tb_backstretch").first(),this.$wrap=e.length?e:t('<div class="tb_backstretch"></div>').css(s).appendTo(this.$container),this.isBody||(e=this.$container.css("position"),o=this.$container.css("zIndex"),this.$container.css({position:"static"===e?"relative":e,zIndex:"auto"===o?0:o,backgroundImage:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&r?"fixed":"absolute"}),this.index=0,this.show(this.index,this.options.is_first),t(i).on("resize.tb_backstretch",t.proxy(this.resize,this)).on("orientationchange.tb_backstretch",t.proxy(function(){this.isBody&&0===i.pageYOffset&&(i.scrollTo(0,1),this.resize())},this))};n.prototype={resize:function(){try{var t,e={left:0,top:0},s=this.isBody?this.$root.width():this.$root.innerWidth(),o=s,n=this.isBody?i.innerHeight?i.innerHeight:this.$root.height():this.$root.innerHeight(),r=o/this.$img.data("ratio");if("best-fit"===this.options.mode)o/n>parseFloat(this.$img.data("ratio"))?this.$img.addClass("best-fit-vertical").removeClass("best-fit-horizontal"):this.$img.addClass("best-fit-horizontal").removeClass("best-fit-vertical");r>=n?(t=(r-n)/2,this.options.centeredY&&(e.top="-"+t+"px")):(t=((o=(r=n)*this.$img.data("ratio"))-s)/2,this.options.centeredX&&(e.left="-"+t+"px")),this.$wrap.css({width:s,height:n}).find("img:not(.deleteable)").css({width:o,height:r}).css(e)}catch(t){}return this},show:function(i,e){if(!(Math.abs(i)>this.images.length-1)){var s,n=this,r=n.$wrap.find("img").addClass("deleteable"),a={relatedTarget:n.$container[0]};return n.$container.trigger(t.Event("tb_backstretch.before",a),[n,i]),this.index=i,clearInterval(n.interval),n.$img=t("<img />").css(o).bind("load",function(s){var o=this.width||t(s.target).width();if(s=this.height||t(s.target).height(),t(this).data("ratio",o/s),void 0!==n){if("best-fit"===n.options.mode){t(this).parent().addClass("best-fit-wrap");var h=o/s;n.$wrap.width()/n.$wrap.height()>h?t(this).addClass("best-fit best-fit-vertical"):t(this).addClass("best-fit best-fit-horizontal")}else"fullcover"===n.options.mode&&n.options.position?t(this).addClass("fullcover-"+n.options.position):"kenburns-effect"===n.options.mode&&t(this).parent().addClass("kenburns-effect");e&&t(this).show()}t(this).fadeIn(n.options.speed||n.options.fade,function(){r.remove(),n.paused||n.cycle(),t(["after","show"]).each(function(){n.$container.trigger(t.Event("tb_backstretch."+this,a),[n,i])})}),n.resize()}).appendTo(n.$wrap),void 0!==n.images[i].url?(s=n.images[i].url,n.images[i].alt&&n.$img.attr("alt",n.images[i].alt)):s=n.images[i],n.$img.attr("src",s),n}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0,!1)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1,!1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(e){t(i).off("resize.tb_backstretch orientationchange.tb_backstretch"),clearInterval(this.interval),e||this.$wrap.remove(),this.$container.removeData("tb_backstretch")}};var r,a=navigator.userAgent,h=navigator.platform,d=!!(d=a.match(/AppleWebKit\/([0-9]+)/))&&d[1],c=!!(c=a.match(/Fennec\/([0-9]+)/))&&c[1],f=a.match(/Opera Mobi\/([0-9]+)/),p=!!f&&f[1],l=!!(l=a.match(/MSIE ([0-9]+)/))&&l[1];r=!((-1<h.indexOf("iPhone")||-1<h.indexOf("iPad")||-1<h.indexOf("iPod"))&&d&&534>d||i.operamini&&"[object OperaMini]"==={}.toString.call(i.operamini)||f&&7458>p||-1<a.indexOf("Android")&&d&&533>d||c&&6>c||"palmGetResource"in i&&d&&534>d||-1<a.indexOf("MeeGo")&&-1<a.indexOf("NokiaBrowser/8.5.0")||l&&6>=l)}(jQuery,window);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка