diff --git a/index.html b/index.html
index cbabc1f..ede12fb 100755
--- a/index.html
+++ b/index.html
@@ -239,7 +239,7 @@
All options can be set with data attributes:
-
+
diff --git a/jTippy.js b/jTippy.js
index b026efe..557e0e6 100755
--- a/jTippy.js
+++ b/jTippy.js
@@ -295,10 +295,10 @@
const target = $(e.target);
if( !target.hasClass('jtippy') && !target.parents('.jtippy:first').length )
{
- $.each($.jTippy.visible, function(index, helper){
- if( typeof helper !== 'undefined' ) {
- if (helper.trigger === 'click' && helper.close_on_outside_click) {
- helper.hide();
+ $.each($.jTippy.visible, function(index, jTippy){
+ if( typeof jTippy !== 'undefined' ) {
+ if (jTippy.close_on_outside_click) {
+ jTippy.hide();
}
}
});
diff --git a/jTippy.min.js b/jTippy.min.js
index 8cbaff7..601262f 100755
--- a/jTippy.min.js
+++ b/jTippy.min.js
@@ -5,4 +5,4 @@
https://htmlguy.com
MIT Licensed
*/
-(function(a){a.fn.jTippy=function(b){if(1${f.title}
`},createBackdropHTML:function(){return!!f.backdrop&&``},destroy:function(){const b=f.dom_wrapped.data(f.dataAttr);"undefined"!=typeof b&&null!==b&&("click"===b.trigger?(b.dom_wrapped.off("touchstart mousedown",b.toggleTooltipHandler),b.dom_wrapped.off("click",b.preventDefaultHandler)):"focus"===b.trigger?(b.dom_wrapped.off("touchstart focus",b.show),b.dom_wrapped.off("touchend blur",b.hide)):"hover"===b.trigger?(b.dom_wrapped.off("touchstart mouseenter",b.show),b.dom_wrapped.off("touchend mouseleave",b.hide)):"hoverfocus"===b.trigger&&(b.dom_wrapped.off("focus",b.hoverfocusFocusShow),b.dom_wrapped.off("blur",b.hoverfocusBlur),b.dom_wrapped.off("touchstart mouseenter",b.show),b.dom_wrapped.off("touchend mouseleave",b.hoverfocusHide)),a(window).off("resize",b.onResize),b.isVisible()&&b.hide(),b.dom_wrapped.data(b.dataAttr,null))},initialize:function(){return"click"===f.trigger?(f.dom_wrapped.on("touchstart mousedown",f.toggleTooltipHandler),f.dom_wrapped.on("click",f.preventDefaultHandler)):"focus"===f.trigger?(f.dom_wrapped.on("touchstart focus",f.show),f.dom_wrapped.on("touchend blur",f.hide)):"hover"===f.trigger?(f.dom_wrapped.on("touchstart mouseenter",f.show),f.dom_wrapped.on("touchend mouseleave",f.hide)):"hoverfocus"===f.trigger&&(f.dom_wrapped.on("focus",f.hoverfocusFocusShow),f.dom_wrapped.on("blur",f.hoverfocusBlur),f.dom_wrapped.on("touchstart mouseenter",f.show),f.dom_wrapped.on("touchend mouseleave",f.hoverfocusHide)),"click"!==f.trigger&&f.dom_wrapped.on("touchstart mousedown",f.hide),a.jTippy.body_click_initialized||(a(document).on("touchstart mousedown",f.onClickOutside),a.jTippy.bodyClickInitialized=!0),f.dom_wrapped.data(f.dataAttr,f),f.dom},hoverfocusFocusShow:function(){f.dom_wrapped.addClass("jt-focused"),f.dom_wrapped.show()},hoverfocusBlur:function(){f.dom_wrapped&&f.dom_wrapped.length&&f.dom_wrapped.removeClass("jt-focused"),f.hide()},hoverfocusHide:function(){return!f.dom_wrapped.hasClass("jt-focused")&&void f.hide()},preventDefaultHandler:function(a){return a.preventDefault(),!1},toggleTooltipHandler:function(a){return a.preventDefault(),f.isVisible()&&f.hide()||f.show(),!1},show:function(b){if(f.isVisible())return!1;f.singleton&&f.hideAllVisible();const c=a("body");"blurred"===f.backdrop?c.addClass("jt-blurred-body"):f.backdrop&&c.append(f.createBackdropHTML()),c.append(f.createTooltipHTML()),f.tooltip=a(".jtippy:last"),f.positionTooltip(),a(window).on("resize",f.onResize);const d="jTippy"+Date.now();f.tooltip.attr("id",d),f.dom.attr("aria-describedby",d),a.jTippy.visible.push(f),("undefined"==typeof b||b)&&f.dom.trigger("jt-show",{tooltip:f.tooltip})},isVisible:function(){return-1c&&(f.positionDebug("Element is less than "+c+"px. Setting arrow to hug the side tighter"),b+=" jt-arrow-super-hug"),a.addClass("jt-arrow-"+b),f.positionDebug("-- Done positioning --"),f)},calculateSafePosition:function(a){let b=f.tooltip.find(".jt-arrow"),c=f.dom_wrapped.offset(),d=f.dom_wrapped.outerHeight(),e=f.dom_wrapped.outerWidth(),g=f.tooltip.outerWidth(),h=f.tooltip.outerHeight(),i=document.querySelector("body").offsetWidth,j=document.querySelector("body").offsetHeight,k=b.is(":visible")?b.outerHeight():0,l=b.is(":visible")?b.outerWidth():0,m={};m.below=5${f.title}
`},createBackdropHTML:function(){return!!f.backdrop&&``},destroy:function(){const b=f.dom_wrapped.data(f.dataAttr);"undefined"!=typeof b&&null!==b&&("click"===b.trigger?(b.dom_wrapped.off("touchstart mousedown",b.toggleTooltipHandler),b.dom_wrapped.off("click",b.preventDefaultHandler)):"focus"===b.trigger?(b.dom_wrapped.off("touchstart focus",b.show),b.dom_wrapped.off("touchend blur",b.hide)):"hover"===b.trigger?(b.dom_wrapped.off("touchstart mouseenter",b.show),b.dom_wrapped.off("touchend mouseleave",b.hide)):"hoverfocus"===b.trigger&&(b.dom_wrapped.off("focus",b.hoverfocusFocusShow),b.dom_wrapped.off("blur",b.hoverfocusBlur),b.dom_wrapped.off("touchstart mouseenter",b.show),b.dom_wrapped.off("touchend mouseleave",b.hoverfocusHide)),a(window).off("resize",b.onResize),b.isVisible()&&b.hide(),b.dom_wrapped.data(b.dataAttr,null))},initialize:function(){return"click"===f.trigger?(f.dom_wrapped.on("touchstart mousedown",f.toggleTooltipHandler),f.dom_wrapped.on("click",f.preventDefaultHandler)):"focus"===f.trigger?(f.dom_wrapped.on("touchstart focus",f.show),f.dom_wrapped.on("touchend blur",f.hide)):"hover"===f.trigger?(f.dom_wrapped.on("touchstart mouseenter",f.show),f.dom_wrapped.on("touchend mouseleave",f.hide)):"hoverfocus"===f.trigger&&(f.dom_wrapped.on("focus",f.hoverfocusFocusShow),f.dom_wrapped.on("blur",f.hoverfocusBlur),f.dom_wrapped.on("touchstart mouseenter",f.show),f.dom_wrapped.on("touchend mouseleave",f.hoverfocusHide)),"click"!==f.trigger&&f.dom_wrapped.on("touchstart mousedown",f.hide),a.jTippy.body_click_initialized||(a(document).on("touchstart mousedown",f.onClickOutside),a.jTippy.bodyClickInitialized=!0),f.dom_wrapped.data(f.dataAttr,f),f.dom},hoverfocusFocusShow:function(){f.dom_wrapped.addClass("jt-focused"),f.dom_wrapped.show()},hoverfocusBlur:function(){f.dom_wrapped&&f.dom_wrapped.length&&f.dom_wrapped.removeClass("jt-focused"),f.hide()},hoverfocusHide:function(){return!f.dom_wrapped.hasClass("jt-focused")&&void f.hide()},preventDefaultHandler:function(a){return a.preventDefault(),!1},toggleTooltipHandler:function(a){return a.preventDefault(),f.isVisible()&&f.hide()||f.show(),!1},show:function(b){if(f.isVisible())return!1;f.singleton&&f.hideAllVisible();const c=a("body");"blurred"===f.backdrop?c.addClass("jt-blurred-body"):f.backdrop&&c.append(f.createBackdropHTML()),c.append(f.createTooltipHTML()),f.tooltip=a(".jtippy:last"),f.positionTooltip(),a(window).on("resize",f.onResize);const d="jTippy"+Date.now();f.tooltip.attr("id",d),f.dom.attr("aria-describedby",d),a.jTippy.visible.push(f),("undefined"==typeof b||b)&&f.dom.trigger("jt-show",{tooltip:f.tooltip})},isVisible:function(){return-1c&&(f.positionDebug("Element is less than "+c+"px. Setting arrow to hug the side tighter"),b+=" jt-arrow-super-hug"),a.addClass("jt-arrow-"+b),f.positionDebug("-- Done positioning --"),f)},calculateSafePosition:function(a){let b=f.tooltip.find(".jt-arrow"),c=f.dom_wrapped.offset(),d=f.dom_wrapped.outerHeight(),e=f.dom_wrapped.outerWidth(),g=f.tooltip.outerWidth(),h=f.tooltip.outerHeight(),i=document.querySelector("body").offsetWidth,j=document.querySelector("body").offsetHeight,k=b.is(":visible")?b.outerHeight():0,l=b.is(":visible")?b.outerWidth():0,m={};m.below=5