How to get the value of the slider bootstrap?

前端 未结 6 600
刺人心
刺人心 2020-12-03 07:20

How to get the values of the slider bootstrap to hidden iputs?



        
6条回答
  •  借酒劲吻你
    2020-12-03 07:41

    you can use this from the built in function

    $( "#slider-range-s1" ).slider({
        range: true,
        min: 0,
        max: 500,
        value: [ 0, 500 ]
        slide: function( event, ui ) {
            // u could use this function
            $(".min-slider-value").html( "$" + ui.values[ 0 ]);
            $(".max-slider-value").html( "$" + ui.values[ 1 ]);
        },
        change: function(event, ui) {
            // or u could use this function
            $(".min-slider-value").html( "$" + ui.values[ 0 ]);
            $(".max-slider-value").html( "$" + ui.values[ 1 ]);
        }
    });
    

    and thank you i thought i coud share this with you guys :D

提交回复
热议问题