How to disable a slider-like input field in bootstrap-slider?

Asked

Viewed 46 times

0

I’d like to know how to disable a camp input of slider in bootstrap-slider?

1 answer

1


To disable a slider using the bootstrap-slider depends on your original instance of the created field.

For example, if you created your slider com jQuery then his instance was more or less like this:

$(document).ready(function() {
            $("#slider1").slider();
});

To manipulate this slider you need to create a variable so that it is associated and can facilitate handling:

$(document).ready(function() {
                var slidervar = $("#slider1").slider();
                slidervar.slider('disable');
    });

If your instance has been sem jQuery, then she was like this:

Slider("slider1", {});

To manipulate this slider you need to create a variable so that it is associated and can facilitate handling:

var slidervar = Slider("slider1", {});
slidervar.disable;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.