Conflict scroll event jscrollpane jquery

Conflict scroll event jscrollpane jquery

I have a problem and is the following; I am using scroll event to paginate records which is defined like this:


$(window).scroll(function() { if ($(window).scrollTop() === $(document).height()- $(window).height()) { //Do something } )};


but I am using jscrollpane too, but when this is visible triggers the scroll event of the window. I tried to do this to disable the scroll of jscrollpane, but does not work

$

('#dvmenu').unbind('jsp-scroll-y').jScrollPane({autoReinitialise: true});


is this possible?