jquery: catch mouseup for the scroller (even if mouseup is not on the scroller)

115 views Asked by At

I'm using a scroller from http://refreshless.com/nouislider/

$("#sample-minimal").noUiSlider({
     range: [0, 100]
    ,start: [20, 80]
    ,connect: true
});

Everything is fine.

I want to fire an event when the scroller was moved to another position right after mouseup.

$("#sample-minimal").mouseup(function() {
//works fine, but it doesn't fire if the mouse was down on the scroller, pulled to another position OUT OF THE SCROLLER and then mouseup
//it works only if the mouse is above the scroller
});

So what I want actually is not the mouseup event of sample-minimal, but mouseup on any part of the page WHEN the mousedown of sample-minimal was trigged (two events all together). As result it actually has the same behavior as the scroller has.

How to make it?

Thank you.

0

There are 0 answers