非常に基本的な助けが必要です。基本的に、モーダル確認ダイアログを作成しようとしていますが、そのほとんどが停止しています。簡単に言えば、「よろしいですか?」というダイアログです。「はい」と「いいえ」の2つのボタンがあります
<script>
$(function() {
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
"Yes": function() {},
"No": function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
「はい」を押すと、ボックスが閉じて、必要なスクリプトの実行が終了するようにするにはどうすればよいですか。それは新しいことかもしれませんが、私は進むにつれて学んでおり、特定の順序ではありません
アップデート1
新しいコード:
$('#stats_ensaves').click(function(){
$('#thedialog').dialog('open');
return false;
});
$('#thedialog').dialog({
autoOpen: false,
width: 300,
buttons: {
"Confirm": function(){
$("#stats_ensaves").dialog("open");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
stats_ensavesはここにあります:<span class="playerstat">Energy Saves: </span>
<span id="stats_ensaves"><a href="http://www.galatium.net/account.php?onnow=N" id="link"><b>ON</b> (7 left)</a></span>
私の新しい質問は次のとおりです。確認ボタンが私をそのリンクにリンクしないのはなぜですか?