jquery - Triggering scroll events binded with .on() -
if bind functions event via on:
$(el).on('scroll.prlx', function() { ... });
i apparently can't trigger event manually with:
$(el).trigger('scroll.prlx');
i tried several types of triggering scroll
. nothing worked far.
one solution animate scroll top 1 , 0 no speed. still leaves jump which, awkward user.
any ideas?
first, attach event handler scrolling passing in function handler like
$('#scrollable').scroll(function(event){ console.log('i scrolled'); });
then, trigger so
$('#scrollable').trigger('scroll');
see in action
Comments
Post a Comment