jQuery-slimScroll icon indicating copy to clipboard operation
jQuery-slimScroll copied to clipboard

scrolling position

Open andy453011 opened this issue 12 years ago • 5 comments

how can i find the scrolling position? when it reached eg 500px, i want to scroll top

andy453011 avatar Dec 03 '12 07:12 andy453011

$(selector).slimScroll().bind('slimscroll', function(e, pos){
    if(pos > 500)
       $(selector).slimScroll({ scrollTo: '0px' });
});

regards

sualko avatar Jan 18 '13 15:01 sualko

From version 1.0.9 onwards, this is the 'slimscrolling' event.

ghost avatar Nov 27 '13 12:11 ghost

But this binding of slimscroll' brings exception saying "Undefined is not a function"

ghost avatar Jul 17 '14 04:07 ghost

You can also try $(selector).scrollTop();

sfx101 avatar Nov 13 '14 11:11 sfx101

$(selector).slimScroll().bind('slimscroll', function(e, pos){
    if(pos > 500)
       $(selector).slimScroll({ scrollTo: '0px' });
});

regards

pos variable is returning 'top' not any integer value.

kamleshwebtech avatar Dec 20 '19 13:12 kamleshwebtech