Файловый менеджер - Редактировать - /home/digitalm/www/zetaworks/wp-content/themes/uncode/library/js/dropImage.min.js
Назад
(function($){"use strict";UNCODE.dropImage=function(){function imageHover(){if($("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined")return;var $postLists=$(".uncode-post-titles");$postLists.each(function(){function manageVideos($el,start){var videoElem=$("video",$el),$iframe=$("iframe",$el),iframeID=$iframe.attr("id");videoElem.length&&Object.prototype.toString.call(videoElem[0].setCurrentTime)=="[object Function]"&&(start?(videoElem[0].setCurrentTime(0),videoElem[0].play()):(videoElem[0].pause(),videoElem[0].setCurrentTime(0))),$el.data("active",start);if($el.attr("data-provider")==="vimeo"&&typeof iframeID!="undefined"&&iframeID!==null){var iframeIDv=iframeID.replace("okplayer-",""),optionsV=$(window).data("okoptions-"+iframeIDv),vimeo=$iframe[0],playerV=$f(vimeo),timeV=0;if(optionsV.time!=null){var timeArr=optionsV.time.replace("t=","").split(/([^\d.-])/);for(var i=0;i<timeArr.length;i++)timeArr[i]==="h"?timeV+=parseFloat(timeArr[i-1])*3600:timeArr[i]==="m"?timeV+=parseFloat(timeArr[i-1])*60:timeArr[i]==="s"&&(timeV+=parseFloat(timeArr[i-1]))}playerV.api("seekTo",timeV),start?playerV.api("play"):playerV.api("pause")}else $el.attr("data-provider")==="youtube"&&(start?$el.trigger("uncode-resume"):$el.trigger("uncode-pause"))}var $list=$(this),timing=parseFloat($list.attr("data-timing")),default_image=$list.hasClass("uncode-post-titles-default-image"),default_title=$list.hasClass("uncode-post-titles-default-title"),$tmbs=$(".tmb",$list),$drop_moves=$(".t-entry-drop:not(.drop-parent)",$tmbs),clientX,clientY,$row_parent=$list.closest(".vc_row"),$drop_row_parents=$(".drop-parent.drop-parent-row",$list),$col_parent=$list.closest(".uncell"),$drop_col_parents=$(".drop-parent.drop-parent-column",$list),setCTA;timing*=.001;var drop_bgs=function(){$drop_row_parents.add($drop_col_parents).filter("[data-bgset]").each(function(e){var $drop=$(this),srcset=$drop.attr("data-bgset"),setArr=srcset.split(","),setArrOrder=[],biggest=0,checkBg=!1;if(SiteParameters.uncode_adaptive==1)typeof setArr[0]!="undefined"&&setArr[0]!==null&&$drop.css({"background-image":"url("+setArr[0]+")"});else{for(var i=0;i<setArr.length;i++){var setLoop=setArr[i].trim().split(" ");if(typeof setLoop[1]!="undefined"&&setLoop[1]!==""){var parseSet=parseFloat(setLoop[1]);biggest<parseSet&&(biggest=parseSet),setArrOrder[parseSet]=setLoop[0],screenInfo.width<=parseSet&&typeof setLoop[0]!="undefined"&&setLoop[0]!==null&&(checkBg=!0,$drop.css({"background-image":"url("+setLoop[0]+")"}))}}!checkBg&&typeof setArrOrder[biggest]!="undefined"&&setArrOrder[biggest]!==null&&$drop.css({"background-image":"url("+setArrOrder[biggest]+")"})}})};drop_bgs();var dropMovesSize=function(){if(UNCODE.wwidth<UNCODE.mediaQuery)return;$drop_moves.each(function(){var $drop_move=$(this),dataW=$drop_move.attr("data-w"),$anim_parent=$drop_move.closest(".animate_when_almost_visible:not(.uncode-skew):not(.t-inside), .parallax-el");typeof dataW!="undefined"&&dataW!==null&&(dataW=screenInfo.width/12*parseFloat(dataW)),$drop_moves.css({width:dataW}),$anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"&&$anim_parent.on("animationend",function(){var bound=$anim_parent[0].getBoundingClientRect();$drop_move.css({left:bound.x*-1,top:bound.y*-1})})})};dropMovesSize(),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){drop_bgs(),dropMovesSize()},100)}),$drop_row_parents.length&&$row_parent.addClass("drop-added"),$drop_row_parents.each(function(index,val){var $drop=$(val);$row_parent.prepend($drop),manageVideos($drop,!1),typeof UNCODE.initVideoComponent!="undefined"&&UNCODE.initVideoComponent($row_parent[0],".uncode-video-container.video, .uncode-video-container.self-video");if(default_image&&index==0){manageVideos($drop,!0);var bg_img=$drop.css("background-image").match(/url\(["']?([^"']*)["']?\)/)[1],image_ph=new Image;typeof bg_img!="undefined"&&bg_img!==null&&(image_ph.onload=function(){$drop.addClass("active"),default_title&&($list.addClass("drop-hover"),$tmbs.first().addClass("drop-active"))},image_ph.src=bg_img)}}),$drop_col_parents.length&&$col_parent.addClass("drop-added"),$drop_col_parents.each(function(index,val){var $drop=$(this);$col_parent.prepend($drop),manageVideos($drop,!1),typeof UNCODE.initVideoComponent!="undefined"&&UNCODE.initVideoComponent($col_parent[0],".uncode-video-container.video, .uncode-video-container.self-video");if(default_image&&index==0){manageVideos($drop,!0);var bg_img=$drop.css("background-image").match(/url\(["']?([^"']*)["']?\)/)[1],image_ph=new Image;typeof bg_img!="undefined"&&bg_img!==null&&(image_ph.onload=function(){$drop.addClass("active"),default_title&&($list.addClass("drop-hover"),$tmbs.first().addClass("drop-active"))},image_ph.src=bg_img)}}),UNCODE.wwidth>=UNCODE.mediaQuery?document.addEventListener("mousemove",function(e){$drop_moves.each(function(){var $drop_move=$(this),duration=.4;$("#uncode-custom-cursor:not(.in-content)").length&&(duration=.8),clientX=e.clientX,clientY=e.clientY,gsap.to($drop_move,{duration:duration,x:clientX,y:clientY,ease:Power1.easeOut})})}):($(window).on("touchend scroll",function(e){$list.removeClass("drop-hover"),$drop_moves.removeClass("active"),$tmbs.removeClass("drop-active")}),$drop_moves.each(function(){var $drop_move=$(this),$tmb=$drop_move.closest(".tmb"),$anim_parent=$drop_move.closest(".animate_when_almost_visible, .uncode-skew, .parallax-el");$anim_parent.hasClass("uncode-skew")&&$anim_parent.css({transform:"skew(0)"}),$tmb.on("touchend",function(e){e.stopPropagation(),$drop_moves.removeClass("active"),$tmbs.removeClass("drop-active"),$list.addClass("drop-hover"),$tmb.addClass("drop-active"),$drop_move.addClass("active"),manageVideos($drop_move,!0),clientX=e.changedTouches[0].clientX,clientY=e.changedTouches[0].clientY;if($anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"){var bound=$anim_parent[0].getBoundingClientRect();clientX-=bound.x,clientY-=bound.y}$drop_move.css({left:clientX,top:clientY})})})),$tmbs.each(function(e){var $tmb=$(this),$trgr=$tmb,$drop_move=$(".t-entry-drop:not(.drop-parent)",$tmb),$anim_parent=$drop_move.closest(".animate_when_almost_visible:not(.uncode-skew):not(.t-inside), .parallax-el"),$video=$("video",$tmb),$iframe=$("iframe",$tmb),$entryTxt=$(".t-entry-text",$tmb),stopBounding;$entryTxt.add($drop_move).css({"transition-duration":timing+"s"});if($video.length){var vidH=$video[0].videoHeight,vidW=$video[0].videoWidth;$video.css({height:vidH,width:vidW})}if($iframe.length){var vidH=$drop_move.attr("data-height"),vidW=$drop_move.attr("data-width");$iframe.css({height:vidH,width:vidW})}$iframe.each(function(){var $video=$(this),vidH=$video[0].videoHeight,vidW=$video[0].videoWidth;$video.css({height:vidH,width:vidW})}),$drop_move.length&&UNCODE.wwidth>=UNCODE.mediaQuery&&($trgr.on("mouseenter",function(e){$list.addClass("drop-hover"),$tmbs.removeClass("drop-active"),$tmb.addClass("drop-active"),$drop_move.addClass("active"),manageVideos($drop_move,!0);var clientX=e.clientX,clientY=e.clientY;$drop_move.css({transform:"translate3d("+clientX+"px, "+clientY+"px, 0px)"})}).on("mouseleave",function(e){$list.removeClass("drop-hover"),$drop_move.css({"transition-duration":timing*1.25+"s"}),$drop_move.removeClass("active"),$tmb.removeClass("drop-active"),$drop_move.on("transitionend",function(e){$drop_move.off("transitionend"),$drop_move.css({"transition-duration":timing+"s"}),manageVideos($drop_move,!1)})}),document.addEventListener("visibilitychange",function(){document.visibilityState=="hidden"&&$drop_move.data("active")===!0&&($drop_move.css({"transition-duration":"0s"}),$drop_move.removeClass("active"),manageVideos($drop_move,!1))}),document.addEventListener("scroll",function(){window.clearRequestTimeout(stopBounding),$drop_move.hasClass("active")&&($list.removeClass("drop-hover"),$tmbs.removeClass("drop-active"),$drop_move.removeClass("active"),$drop_move.on("transitionend",function(e){$drop_move.off("transitionend"),$drop_move.css({"transition-duration":timing+"s"}),manageVideos($drop_move,!1)})),stopBounding=requestTimeout(function(){if($anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"){var bound=$anim_parent[0].getBoundingClientRect();$drop_move.css({left:bound.x*-1,top:bound.y*-1})}},200)}));var datatarget=$trgr.closest("[data-drop-target]").attr("data-drop-target"),$drop=$('[data-drop="'+datatarget+'"]',$row_parent);$drop.css({"transition-duration":timing+"s"}),($drop_row_parents.length||$drop_col_parents.length)&&$drop.length&&($trgr.on("mouseenter",function(e){$row_parent.add($col_parent).addClass("drop-list-loaded"),$list.addClass("drop-hover");if(!$tmb.hasClass("drop-active")){$tmbs.removeClass("drop-active"),$tmb.addClass("drop-active");if(default_image&&!$drop.hasClass("active")){var $prev=$("[data-drop].active",$row_parent);$prev.css({"transition-duration":timing*1.5+"s"}),$prev.removeClass("active"),$prev.on("transitionend",function(e){$prev.off("transitionend"),manageVideos($prev,!1)})}$drop.css({"transition-duration":timing+"s"}),$drop.off("transitionend"),$drop.addClass("active"),manageVideos($drop,!0)}}).on("mouseleave",function(e){if(default_image&&!default_title||!default_image)$list.removeClass("drop-hover"),$tmb.removeClass("drop-active");default_image||($drop.css({"transition-duration":timing*1.5+"s"}),$drop.removeClass("active"),$drop.on("transitionend",function(e){$drop.off("transitionend"),manageVideos($drop,!1)}))}),document.addEventListener("visibilitychange",function(){document.visibilityState=="hidden"&&$drop.data("active")===!0&&!default_image&&($drop.css({"transition-duration":"0s"}),$drop.removeClass("active"),manageVideos($drop,!1))}))})})}$(window).on("load",function(event){imageHover()});var drop_wp_animation=function(){var $postLists=$(".uncode-post-titles");$postLists.each(function(){$.each($(".t-inside.animate_when_almost_visible",$postLists),function(index,val){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$(this.element),parent=element.closest(".tmb"),currentIndex=parent.index(),delay=currentIndex,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100);var objTimeout=requestTimeout(function(){element.addClass("start_animation");var nextTimeout=requestTimeout(function(){$(".drop-image-separator",parent).addClass("start_animation")},50)},delay*delayAttr);UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})})})},runWaypoints_TO,runWaypoints_delay=0,runWaypoints=function(){typeof runWaypoints_TO!="undefined"&&runWaypoints_TO!==""&&(runWaypoints_delay=400),clearRequestTimeout(runWaypoints_TO),runWaypoints_TO=requestTimeout(function(){drop_wp_animation()},runWaypoints_delay)};runWaypoints(),$(document.body).on("uncode_waypoints",runWaypoints),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:ready shortcodeView:updated",function(){runWaypoints()})}})(jQuery)
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.04 |
proxy
|
phpinfo
|
Настройка