このjquery_modal_confirm_dialogueは多くの実験の後に動作しています。 私たちの訪問者は、利用規約に同意すると、彼らは私が必死にクッキーを設定する必要があり、製品のページproducts.htmlクッキー - jqueryモーダルを設定するダイアログを確認する
にリダイレクトされます。 - 一致しない場合、products.htmlにアクセスしようとすると、 は表示されず、再度モーダルダイアログが表示されます
教えてください。 (jqueryの1.3.2.min.js)
これは、これは私のindex.htmlである私のjqmodal.js
function confirm(msg,callback) {
$('#confirm')
.jqmShow()
.find('p.jqmConfirmMsg')
.html(msg)
.end()
.find(':submit:visible')
.click(function(){
if(this.value == 'yes')
(typeof callback == 'string') ?
window.location.href = callback :
callback();
$('#confirm').jqmHide();
});
}
$().ready(function() {
$('#confirm').jqm({overlay: 88, modal: true, trigger: false});
// trigger a confirm whenever links of class alert are pressed.
$('a.confirm').click(function() {
confirm('About to visit: '+this.href+' !',this.href);
return false;
});
});// JavaScript Document
です:私が正しく理解していれば
<a href="http://products.html/" class="confirm">Products</a>
<div class="jqmConfirm" id="confirm">
<div id="ex3b" class="jqmConfirmWindow">
<div class="jqmConfirmTitle clearfix">
<h1>Terms of Use</h1>
</div>
<div class="jqmConfirmContent">
<p class="jqmConfirmMsg"></p>
<p>Important legal information</p></div>
<input type="submit" value="Decline" />
<input type="submit" value="Proceed" />
</div>
</div>
答えを正しいものとしてマークしてください。 –