$('#mdialog').dialog({
autoOpen: false,
width: 320,
buttons: {
Apply: function() {
<!--alert($('#slider').slider('option', 'value'));-->
try{
SendCommandToAO($('#slider').slider('option', 'value'), 'AO=a1c1p1', 0, 65535, 0, 65535, -1);
} catch(e) {
//Fool
}
//$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
}
});
views:
33answers:
1
+1
A:
It sounds like you want to reset the slider when you cancel. In your cancel function, you can set the value to whatever the default is, like this:
Cancel: function() {
$('#slider').slider('value', 50);
$(this).dialog("close");
}
Nick Craver
2010-03-30 12:34:02