|
|
@ -22,7 +22,7 @@ $.fn.popup = function(parameters) { |
|
|
|
|
|
|
|
moduleSelector = $allModules.selector || '', |
|
|
|
|
|
|
|
hasTouch = ('ontouchstart' in document.documentElement), |
|
|
|
hasTouch = (true), |
|
|
|
time = new Date().getTime(), |
|
|
|
performance = [], |
|
|
|
|
|
|
@ -156,7 +156,9 @@ $.fn.popup = function(parameters) { |
|
|
|
: settings.delay |
|
|
|
; |
|
|
|
clearTimeout(module.hideTimer); |
|
|
|
module.showTimer = setTimeout(module.show, delay); |
|
|
|
if(!openedWithTouch) { |
|
|
|
module.showTimer = setTimeout(module.show, delay); |
|
|
|
} |
|
|
|
}, |
|
|
|
end: function() { |
|
|
|
var |
|
|
@ -169,7 +171,7 @@ $.fn.popup = function(parameters) { |
|
|
|
}, |
|
|
|
touchstart: function(event) { |
|
|
|
openedWithTouch = true; |
|
|
|
module.event.start(); |
|
|
|
module.show(); |
|
|
|
}, |
|
|
|
resize: function() { |
|
|
|
if( module.is.visible() ) { |
|
|
@ -279,7 +281,6 @@ $.fn.popup = function(parameters) { |
|
|
|
show: function(callback) { |
|
|
|
callback = callback || function(){}; |
|
|
|
module.debug('Showing pop-up', settings.transition); |
|
|
|
|
|
|
|
if(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) { |
|
|
|
if( !module.exists() ) { |
|
|
|
module.create(); |
|
|
@ -398,8 +399,8 @@ $.fn.popup = function(parameters) { |
|
|
|
hide: function(callback) { |
|
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
|
module.debug('Hiding pop-up'); |
|
|
|
if(settings.onShow.call($popup, element) === false) { |
|
|
|
module.debug('onShow callback returned false, cancelling popup animation'); |
|
|
|
if(settings.onHide.call($popup, element) === false) { |
|
|
|
module.debug('onHide callback returned false, cancelling popup animation'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { |
|
|
@ -884,7 +885,7 @@ $.fn.popup = function(parameters) { |
|
|
|
.on('touchstart' + eventNamespace, module.event.touchstart) |
|
|
|
; |
|
|
|
} |
|
|
|
else if( module.get.startEvent() ) { |
|
|
|
if( module.get.startEvent() ) { |
|
|
|
$module |
|
|
|
.on(module.get.startEvent() + eventNamespace, module.event.start) |
|
|
|
.on(module.get.endEvent() + eventNamespace, module.event.end) |
|
|
|