我回来了。。。我试图让jqueryui的按钮和对话框插件与我的表单一起工作。我要复位按钮
<button id="opener" value="reset" type="submit">Reset</button>
打开一个确认对话框。取消应关闭对话框并将按钮设置回其原始状态。它很好地拒绝了,但是按钮保持了它的悬停状态,即使我尝试在我能想到的任何地方添加.refresh方法。
jQuery(document).ready(function($) {
$(".dialog").dialog({
autoOpen: false,
resizable: false,
modal: true,
title: 'Warning!',
close: function () {
$('#opener').button('refresh');
},
buttons: {
'Continue': function() {
$(this).dialog('close');
},
Cancel: function() {
$(this).dialog('close');
$('#opener').button('refresh')
}
}
});
$('#opener').click(function() {
$('.dialog').dialog('open');
$(this).button('refresh')
return false;
});
});
然后在“继续”响应中,按钮应继续其原始用途。。但这不会发生。我得到一个return:false类型的行为,而没有return:false。