PATH:
home
/
letacommog
/
lescompagnons
/
wp-content
/
plugins
/
elementor-extras
/
assets
/
lib
/
hotips
!function(t,o,e,i){t.hotips=function(i,s){var n={scope:null,id:null,position:"top",arrowPositionH:"center",arrowPositionV:"center",fixed:!1,trigger:{desktop:"mouseenter",tablet:"click_target",mobile:"click_target"},hide:{desktop:"mouseleave",tablet:"click_out",mobile:"click_out"},delayIn:0,delayOut:0,speed:.2,content:!1,source:!1,responsive:{disable:!1,breakpoints:{mobile:768,tablet:1024}},class:null},p=this;p.opts={};var a=null,r=null,l=null,c=t(i),u=null,d=!1,h=!1,f=null,g=null,m=0,w=0,v=-20;p.init=function(){null===s.delayIn&&(s.delayIn=n.delayIn),null===s.delayOut&&(s.delayOut=n.delayOut),p.opts=t.extend({},n,s),p._construct()},p._construct=function(){p.opts.scope?(a=p.opts.scope,l=p.opts.scope):(a=t(o),l=t(e)),p.canShow()&&(p.setTriggers(),c.data("hotips-position")&&(p.opts.position=c.data("hotips-position")),c.data("hotips-arrow-position-h")&&(p.opts.arrowPositionH=c.data("hotips-arrow-position-h")),c.data("hotips-arrow-position-v")&&(p.opts.arrowPositionV=c.data("hotips-arrow-position-v")),r=t('<div class="hotip-tooltip"></div>'),p.opts.id&&r.attr("data-target-id",p.opts.id),p.setup(),p.events())},p.addClasses=function(){var t="",o=c.attr("data-hotips-class"),e=p.opts.classes;o?t+=o:e&&(o+=e),r.addClass(t)},p.setup=function(){p.setContent()&&p.position()},p.setContent=function(){var o=null;if(c.attr("data-hotips-content")){if(o=l.find(c.attr("data-hotips-content")),!o.length||""===t.trim(o.html()))return!1;var e=o.html();u=t("<span>"+e+"</span>").addClass("ee-tooltip__content")}else if(p.opts.source){if("string"==typeof p.opts.source?o=l.find(p.opts.source):"object"==typeof p.opts.source&&(o=p.opts.source),!o.length||""===t.trim(o.html()))return!1;var e=o.html();u=t("<span>"+e+"</span>").addClass("ee-tooltip__content")}else{if(!p.opts.content)return!1;u=p.opts.content}return!0},p.setTriggers=function(){p.isMobile()?(f=p.opts.trigger.mobile,g=p.opts.hide.mobile):p.isTablet()||p.isMobile()?(f=p.opts.trigger.tablet,g=p.opts.hide.tablet):(f=p.opts.trigger.desktop,g=p.opts.hide.desktop)},p.events=function(){u&&(t(o).resize(p.onResize),p.setTriggerEvents())},p.setTriggerEvents=function(){f&&"mouseenter"!==f&&"hover"!==f?"click_target"===f?c.on("click touchstart",p.show):"load"===f?l.on("ready",p.show):c.on("mouseenter",p.show):c.on("mouseenter touchstart",p.show),g&&"mouseleave"!==g?"click_out"===g?l.on("mouseup touchstart",p.clickOutside):"click_any"===g?(l.on("mouseup touchstart",p.clickOutside),c.off("click touchstart",p.show).on("click touchstart",p.toggle)):"click_target"!==f&&"click_target"===g?c.on("click touchstart",p.hide):"click_target"===f&&"click_target"===g?c.off("click touchstart",p.show).on("click touchstart",p.toggle):c.on("mouseleave",p.hide):c.on("mouseleave touchstart",p.hide)},p.removeTriggerEvents=function(){c.off("mouseenter touchstart",p.show),c.off("click touchstart",p.show),l.off("ready",p.show),c.off("mouseleave",p.hide),l.off("mouseup touchstart",p.clickOutside),c.off("click touchstart",p.hide),c.off("click touchstart",p.toggle)},p.clickOutside=function(t){r.is(t.target)||0!==r.has(t.target).length||p.hide()},p.getPosition=function(){a.width()<r.outerWidth()&&r.css("max-width",a.width()),p.opts.position||(p.opts.position="bottom");var e=p.opts.position,i="left"===e||"right"===e?p.opts.arrowPositionV:p.opts.arrowPositionH,s=p.opts.fixed?0:t(o).scrollTop(),n=r.get(0).getBoundingClientRect(),l=c.get(0).getBoundingClientRect(),u=p.opts.fixed?n.width:r.outerWidth(),d=p.opts.fixed?n.height:r.outerHeight(),h=p.opts.fixed?l.top:c.offset().top,f=p.opts.fixed?l.left:c.offset().left,g=p.opts.fixed?l.width:c.outerWidth(),b=p.opts.fixed?l.height:c.outerHeight();"bottom"===p.opts.position?(w=h+b+10,m=f+g/2-u/2,v=20):"top"===p.opts.position?(w=h-d-10,m=f+g/2-u/2,v=-20):"left"===p.opts.position?(w=h+b/2-d/2,m=f-u-10,v=-20):"right"===p.opts.position&&(w=h+b/2-d/2,m=f+g+10,v=20),"top"!==p.opts.position&&"bottom"!==p.opts.position||("right"===p.opts.arrowPositionH?m=f+g-u:"left"===p.opts.arrowPositionH&&(m=f)),"left"!==p.opts.position&&"right"!==p.opts.position||("bottom"===p.opts.arrowPositionV?w=h+b-d:"top"===p.opts.arrowPositionV&&(w=h));var k=w-s,y=m,T=t(o).width()-(m+u),x=t(o).height()+s-(w+d);return k<0&&("left"===p.opts.position||"right"===p.opts.position?(w=h,i="top"):(w=h+b+10,e="bottom",v=20)),x<0&&("left"===p.opts.position||"right"===p.opts.position?(w=h+b-d,i="bottom"):(w=h-d-10,e="top",v=-20)),y<0&&("left"===p.opts.position?(m=f+g+10,e="right",v=20):(m=f,i="left")),T<0&&("right"===p.opts.position?(m=f-u-10,e="left",v=-20):(i="right",m="top"===p.opts.position||"bottom"===p.opts.position?f+g-u:f+g)),{top:w,left:m,to:e,at:i}},p.onResize=function(){p.removeTriggerEvents(),p.setTriggers(),p.setTriggerEvents(),p.position()},p.position=function(){var t=p.getPosition();r.css({position:p.opts.fixed?"fixed":"absolute",top:t.top,left:t.left});var o=t.at?"at--"+t.at:"",e=t.to?"to--"+t.to:"";r.removeClass("to--top to--bottom to--right to--left at--left at--right at--top at--bottom"),r.addClass(e+" "+o)},p.canShow=function(){return("tablet"!==p.opts.responsive.disable||!p.isTablet()&&!p.isMobile())&&("mobile"!==p.opts.responsive.disable||!p.isMobile())},p.toggle=function(t){d?p.hide(t):p.show(t)},p.show=function(o){o&&(o.preventDefault(),o.stopPropagation()),!0!==d&&u&&(d=!0,p.addClasses(),r.empty().append(u),l.find("body").append(r),r.css({position:"fixed",left:-99999,top:-99999}),void 0!==t.fn._resize&&p.opts.scope&&r._resize(function(){p.onResize()}),p.position(),TweenMax.killTweensOf(r),"top"===p.opts.position?TweenMax.fromTo(r,p.opts.speed,{top:w+v,autoAlpha:0},{delay:p.opts.delayIn,top:w,autoAlpha:1,onComplete:function(){d=!0}}):"right"===p.opts.position?TweenMax.fromTo(r,p.opts.speed,{left:m+v,autoAlpha:0},{delay:p.opts.delayIn,left:m,autoAlpha:1,onComplete:function(){d=!0}}):"bottom"===p.opts.position?TweenMax.fromTo(r,p.opts.speed,{top:w+v,autoAlpha:0},{delay:p.opts.delayIn,top:w,autoAlpha:1,onComplete:function(){d=!0}}):"left"===p.opts.position&&TweenMax.fromTo(r,p.opts.speed,{left:m+v,autoAlpha:0},{delay:p.opts.delayIn,left:m,autoAlpha:1,onComplete:function(){d=!0}}),"click_any"===p.opts.hide&&"click_target"===p.opts.trigger&&c.on("click",p.show))},p.hide=function(t){t&&(t.preventDefault(),t.stopPropagation()),TweenMax.killTweensOf(r),"top"===p.opts.position?TweenMax.to(r,p.opts.speed,{top:w+v,autoAlpha:0,delay:p.opts.delayOut,onComplete:function(){r.remove(),d=!1}}):"right"===p.opts.position?TweenMax.to(r,p.opts.speed,{left:m+v,autoAlpha:0,delay:p.opts.delayOut,onComplete:function(){r.remove(),d=!1}}):"bottom"===p.opts.position?TweenMax.to(r,p.opts.speed,{top:w+v,autoAlpha:0,delay:p.opts.delayOut,onComplete:function(){r.remove(),d=!1}}):"left"===p.opts.position&&TweenMax.to(r,p.opts.speed,{left:m+v,autoAlpha:0,delay:p.opts.delayOut,onComplete:function(){r.remove(),d=!1}})},p.isTablet=function(){return a.width()<p.opts.responsive.breakpoints.tablet&&a.width()>=p.opts.responsive.breakpoints.mobile},p.isMobile=function(){return a.width()<p.opts.responsive.breakpoints.tablet&&a.width()<p.opts.responsive.breakpoints.mobile},p.isDesktop=function(){return a.width()>p.opts.responsive.breakpoints.tablet},p.destroy=function(){p.hide(),a.off("resize",p.onResize),p.removeTriggerEvents(),h=!0},p.init()},t.fn.hotips=function(o){return this.each(function(){if(t.fn.hotips.destroy=function(){void 0!==typeof e&&(t(this).data("hotips").destroy(),t(this).removeData("hotips"))},void 0!==typeof t(this).data("hotips")){var e=new t.hotips(this,o);t(this).data("hotips",e)}})}}(jQuery,window,document);
[+]
..
[-] hotips.min.js
[edit]
[-] hotips.js
[edit]