Disable jQuery UI slider -


i have slider trying disable based on jquery if/else statement.

if (("#ceremony").checked) {   $( "#ceremony_amount" ).val( "$" + $( "#ceremony-range-min" ).slider( "value"         ).tofixed(2) ); } else {   $( "#ceremony_amount" ).val( "$" + $( "#ceremony-range-min" ).slider( "disable" ).tofixed(2) ); } 

this disable slider no issues when go checked checkbox id = "ceremony" not enable slider again.

i trying figure out if i'm not calling checked attribute or if in if/else statement. appreciated.

change

$( "#ceremony_amount" ).val( "$" + $( "#ceremony-range-min" ).slider( "value").tofixed(2) ); 

to

$( "#ceremony_amount" ).val( "$" + $( "#ceremony-range-min").slider("enable").slider("option", "value" ).tofixed(2) ); 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -