jquery.appear
jquery.appear copied to clipboard
A bug fix and some efficiency upgrade
I found a bug when running multiple instances of appear for example something like this
$('.selector1').appear({force_process: true})
.on('appear', function() {
console.log('hi 1');
})
.on('disappear', function() {
console.log('bye 1');
});
$('.selector2').appear({force_process: true})
.on('appear', function() {
console.log('hi 2');
})
.on('disappear', function() {
console.log('bye 2');
});
when scrolled and both selector where visible disappear was triggered for both selectors.
Second fix is for disabling running appear event for elements for which it was already fired.