可以正常使用文本鏈接來觸發對話框 - 但如果從HTML表單提交按鈕觸發,則持續約0.5秒。聽起來很瘋狂!是的,只是無法讓它工作。幫幫我!JqueryUI對話框。無法從HTML表單中觸發
$(document).ready(function() {
$('#rating-0').click(function() { $('#dialog').dialog('open'); }); $('#dialog').dialog({ autoOpen: false, height: 280, modal: true, resizable: false, buttons: { Continue: function() {
$(this).dialog('close'); // Submit Rating
}, 'Change Rating': function() {
$(this).dialog('close'); // Update Rating
} }
});
});
<form action="https://www.etc" id="rating-0">
<input type="hidden" name="cmd" value="_s-xclick" />
<input name="submit" type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" />
</form>
<div id="dialog" title="Are you sure?">
<p>You've assigned the current celebrity a rating of 0…</p> <p>Perhaps you are just judging them on the terrible last movie…</p>
</div>
可否請你發佈一些標記?如果我們看不到你做了什麼,它很難提供幫助。 ('#rating-0')。click(function(){('#dialog')。dialog('open'); }); ( – Brandon 2010-10-25 18:03:26
)$(document).ready(function(){。 $( '#對話')對話框({ 的AutoOpen:假的, 高度:280, 模式:真, 可調整大小:假的, 按鈕:{ 繼續:函數(){$ (本).dialog ( '親密'); // 提交評分 }, '更改評級':函數(){$ (本).dialog( '親密'); // 更新評級 }} }); }); – Rosy 2010-10-25 18:17:51
\t \t
You've assigned the current celebrity a rating of 0…
Perhaps you are just judging them on the terrible last movie…