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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -