Jquery ui slider: mouse call function

I use jquery ui slider , and everything is fine, except that functioni, defined in the change parameter fired, only when I release the mouse over the handles. Is there a way to call a function when the mouse goes out of bounds slider?

thanks for the help.

+3
source share
7 answers
$("#slider").slider({
    start: function(event, ui) {
        // do something on mousedown on slider
    },
    stop: function(event, ui) {
        // do something on mouseup anywhere
    }
});
+3
source

I think you used it that way ... The nature of the change event is that when you click up, the changes in the slider event will be displayed ...

$( ".selector" ).slider({
   **change**: function(event, ui) { ... }
});

- ...... , , .

$( ".selector" ).slider({
   **slide**: function(event, ui) { ... }
});

Dhaval mistry... (UI developer)

+2

, , - , , , , , , - , .

jquery, ? , :

jQuery UI

, , , , .

0

. , div, div. :

  • , ,

  • div.

  • div.

  • .

  • - .

  • div .

  • .

0
0

. . http://api.jqueryui.com/slider/ :

$('.selector').slider(function() {
    change: function( event, ui ) {}
});
0

Source: https://habr.com/ru/post/1770289/


All Articles