Browse Source

Adds on scroll auto

1.0
jlukic 10 years ago
parent
commit
d59dd648ad
1 changed files with 3 additions and 3 deletions
  1. 6
      src/definitions/modules/popup.js

6
src/definitions/modules/popup.js

@ -666,7 +666,7 @@ $.fn.popup = function(parameters) {
; ;
}, },
close:function() { close:function() {
if(settings.hideOnScroll) {
if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') {
$document $document
.one('touchmove' + eventNamespace, module.hideGracefully) .one('touchmove' + eventNamespace, module.hideGracefully)
.one('scroll' + eventNamespace, module.hideGracefully) .one('scroll' + eventNamespace, module.hideGracefully)
@ -690,7 +690,7 @@ $.fn.popup = function(parameters) {
unbind: { unbind: {
close: function() { close: function() {
if(settings.hideOnScroll) {
if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') {
$document $document
.off('scroll' + eventNamespace, module.hide) .off('scroll' + eventNamespace, module.hide)
; ;
@ -938,7 +938,7 @@ $.fn.popup.settings = {
on : 'hover', on : 'hover',
closable : true, closable : true,
hideOnScroll : true,
hideOnScroll : 'auto',
context : 'body', context : 'body',
position : 'top left', position : 'top left',

Loading…
Cancel
Save