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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -