I want my range slider is disabled when the checkbox is checked using jquery.If check box is unchecked then range slider want to be enable.My code is,
JavaScript
x
$(document).on('change','#checkbox6b',function()
{
if("input[name='responsive']:checked")
{
/* code */
}
else
{
/* code */
}
});
Can anyone help me?
Advertisement
Answer
Just call properties disable
and enable
on your range slider.
Please replace the id with your ranger’s HTML ID attribute.
JavaScript
$(document).on('change','#checkbox6b',function()
{
if($("input[name='responsive']:checked"))
{
$('#YOUR-SLIDER-ID').slider('disable');
}
else
{
$('#YOUR-SLIDER-ID').slider('enable');
}
});