Search code examples
jqueryjquery-uijquery-ui-slider

jQuery UI Slider: no pre-selection desired


When implementing jQuery UI Slider (http://jqueryui.com/demos/slider/) there is always a pre-selection (default value 0).

How can we remove the pre-selection? The slider (button) shall only appear once the user clicked somewhere on the visual analogue scale.

Help much appreciated!

Best, Lionel


Solution

  • You mean like this jsFiddle example?

    jQuery:

    $("#slider").slider({
        change: function(event, ui) {
            $('a.ui-slider-handle').show();
        }
    });
    $('a.ui-slider-handle').hide();​