pushing the button of cancel the value must return the initial value but it dosn't work
$('#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");
}
}
});
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");
}
精彩评论