|
@ -426,13 +426,22 @@ $.fn.popup = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
startEvent: function() { |
|
|
startEvent: function() { |
|
|
if(settings.on == 'hover') { |
|
|
if(settings.on == 'hover') { |
|
|
return 'mouseenter'; |
|
|
|
|
|
|
|
|
return (hasTouch) |
|
|
|
|
|
? 'touchstart mouseenter' |
|
|
|
|
|
: 'mouseenter' |
|
|
|
|
|
; |
|
|
} |
|
|
} |
|
|
else if(settings.on == 'focus') { |
|
|
else if(settings.on == 'focus') { |
|
|
return 'focus'; |
|
|
return 'focus'; |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |
|
|
}, |
|
|
}, |
|
|
|
|
|
scrollEvent: function() { |
|
|
|
|
|
return (hasTouch) |
|
|
|
|
|
? 'touchmove scroll' |
|
|
|
|
|
: 'scroll' |
|
|
|
|
|
; |
|
|
|
|
|
}, |
|
|
endEvent: function() { |
|
|
endEvent: function() { |
|
|
if(settings.on == 'hover') { |
|
|
if(settings.on == 'hover') { |
|
|
return 'mouseleave'; |
|
|
return 'mouseleave'; |
|
@ -791,6 +800,7 @@ $.fn.popup = function(parameters) { |
|
|
; |
|
|
; |
|
|
} |
|
|
} |
|
|
else if( module.get.startEvent() ) { |
|
|
else if( module.get.startEvent() ) { |
|
|
|
|
|
console.log(module.get.startEvent()); |
|
|
$module |
|
|
$module |
|
|
.on(module.get.startEvent() + eventNamespace, module.event.start) |
|
|
.on(module.get.startEvent() + eventNamespace, module.event.start) |
|
|
.on(module.get.endEvent() + eventNamespace, module.event.end) |
|
|
.on(module.get.endEvent() + eventNamespace, module.event.end) |
|
@ -813,12 +823,10 @@ $.fn.popup = function(parameters) { |
|
|
close:function() { |
|
|
close:function() { |
|
|
if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') { |
|
|
if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') { |
|
|
$document |
|
|
$document |
|
|
.one('touchmove' + elementNamespace, module.hideGracefully) |
|
|
|
|
|
.one('scroll' + elementNamespace, module.hideGracefully) |
|
|
|
|
|
|
|
|
.one(module.get.scrollEvent() + elementNamespace, module.hideGracefully) |
|
|
; |
|
|
; |
|
|
$context |
|
|
$context |
|
|
.one('touchmove' + elementNamespace, module.hideGracefully) |
|
|
|
|
|
.one('scroll' + elementNamespace, module.hideGracefully) |
|
|
|
|
|
|
|
|
.one(module.get.scrollEvent() + elementNamespace, module.hideGracefully) |
|
|
; |
|
|
; |
|
|
} |
|
|
} |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|