Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
element-ready-lite
/
assets
/
js
/
widgets
/
Editing: hotspot.js
!function($){var a=function(b,$){var e=b.find(".er-hotspot-hotspot"),f=b.find(".element__ready____hotspot__wrap"),j=b.find(".er-hotspot-hotspots-label"),c=f.data("event"),k=Boolean(f.data("open_all"));e.each(function(){var a=$(this),b=a.data("top"),c=a.data("left");a.css({top:b+"%",left:c+"%"}).addClass("er-hotspot-is-visible"),k&&a.addClass("er-hotspot-is-active")});var g="hover"==c?"mouseenter":"click",h="hover"==c?"mouseleave":"click";j.on(h,function(a){$(this).removeClass("er-hotspot-is-visible"),$(this).parents(".er-hotspot-image").find(".er-hotspot-hotspot").removeClass("er-hotspot-is-active"),a.preventDefault()}),e.on(g,function(c){var d=$(this).data("text"),a=$(this).data("button-text"),e=$(this).data("button-url"),b=` <h4>${$(this).text()}</h4> <p>${d}</p> ${Boolean(a)} ?? <a href="${e}" >${a} </a> `;$(this).hasClass("er-hotspot-is-active")?($(this).removeClass("er-hotspot-is-active"),$(this).parents(".er-hotspot-image").find(".er-hotspot-hotspots-label").html(b).removeClass("er-hotspot-is-visible")):($(this).parents(".er-hotspot-image").find(".er-hotspot-hotspot").removeClass("er-hotspot-is-active"),$(this).addClass("er-hotspot-is-active"),$(this).parents(".er-hotspot-image").find(".er-hotspot-hotspots-label").html(b).addClass("er-hotspot-is-visible")),c.preventDefault()});var i=b.find(".er--hotspot--lg-hotspot__button");if(i.length){g="hover"==c?"mouseenter":"click",h="hover"==c?"hover":"click";let p=a=>{let b=a.target.parentElement,c=b.parentElement,d=c.querySelectorAll(".er--hotspot--lg-hotspot");d.forEach(a=>{a===b?a.classList.toggle("er--hotspot--lg-hotspot--selected"):a.classList.remove("er--hotspot--lg-hotspot--selected")})};i.each(function(a){$(this).on(g,p)});let l=b.find(".er--hotspot--lg-hotspot");k&&l.each(function(a){$(this).addClass("er--hotspot--lg-hotspot--selected")})}let d="ontouchstart"in window?"touchend":"click",m=b.find(".er--trigger"),n=b.find(".er--hotspot");for(let a of m)a.style.top=a.dataset.top+"%",a.style.left=a.dataset.left+"%",a.style.setProperty("--er_hostspot_keyframe_pulse_hover_color",a.dataset.color),a.style.setProperty("--er_hostspot_keyframe_pulse_color",a.dataset.normal_color),a.addEventListener(d,function(a){a.stopPropagation(),this.parentNode.classList.add("reveal")},!1);for(let o of n)o.addEventListener(d,function(){for(let a of n)a.classList.remove("reveal")});document.body.addEventListener(d,function(){for(let a of n)a.classList.remove("reveal")})};$(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/Element_Ready_HotSpot_Widget.default",a)})}(jQuery);
Save
Cancel