3gwebtrain 3gwebtrain - 24 days ago 7
jQuery Question

jquery-slimscroll how to bind and unbind the scroll event

I am trying to bind and unbind a scroll event. but i count. any one help me please/

my code :

$(container).slimScroll().
bind('slimscroll', function(e, pos){
if(pos == 'bottom') {
$.event.trigger('bottomReached');
}
});

$("#off").click(function () {
container.slimScroll().off('slimscroll');
});

$("#on").click(function () {
container.slimScroll().on('slimscroll');
});


Live

Answer Source

Try:

$(container).slimScroll().removeData('events');

Here is the corresponding jsfiddle.