|
@ -98,6 +98,8 @@ $.fn.visibility = function(parameters) { |
|
|
.off(eventNamespace) |
|
|
.off(eventNamespace) |
|
|
.removeData(moduleNamespace) |
|
|
.removeData(moduleNamespace) |
|
|
; |
|
|
; |
|
|
|
|
|
$window.off('resize' + eventNamespace, module.event.refresh); |
|
|
|
|
|
$context.off('scroll' + eventNamespace, module.event.scroll); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
observeChanges: function() { |
|
|
observeChanges: function() { |
|
@ -313,6 +315,12 @@ $.fn.visibility = function(parameters) { |
|
|
module.bottomVisible(); |
|
|
module.bottomVisible(); |
|
|
module.topPassed(); |
|
|
module.topPassed(); |
|
|
module.bottomPassed(); |
|
|
module.bottomPassed(); |
|
|
|
|
|
|
|
|
|
|
|
// on update callback
|
|
|
|
|
|
if(settings.onUpdate) { |
|
|
|
|
|
settings.onUpdate.call(element, module.get.elementCalculations()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -1003,6 +1011,7 @@ $.fn.visibility.settings = { |
|
|
onBottomPassedReverse : false, |
|
|
onBottomPassedReverse : false, |
|
|
|
|
|
|
|
|
// utility callbacks
|
|
|
// utility callbacks
|
|
|
|
|
|
onUpdate : false, // disabled by default for performance
|
|
|
onRefresh : function(){}, |
|
|
onRefresh : function(){}, |
|
|
onScroll : function(){}, |
|
|
onScroll : function(){}, |
|
|
|
|
|
|
|
|