我試圖讓模態只彈出一次,每週。Twitter Bootstrap模態和JQuery Cookie插件
我使用Wordpress和Roots主題,並使腳本排入隊列並正確註冊。
我的模態代碼
<div class="modal hide fade modalborder" id="myModal">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<div class="modal-body">
<h2 class="modalheader">Header Here</h2>
<p class="modalcoffee">Text here</p>
<p class="modalcomesin">Text here</p>
</div>
<p class="modallearn">Text Here</p>
<p class="modalready">Are you ready to <span class="modalstart">start</span>?</p>
<a href="#" class="btn btn-info">Click Here</a>
</div>
</div>
目前JavaScript來製作這部作品完美的作品:
<script type="text/javascript">
$(window).load(function(){
$('#myModal').modal('show');
});
</script>
我還不是很瞭解的jQuery和JavaScript對這一問題。我需要做什麼才能使這項工作與Cookie?
您的複選框字段在哪裏?另外,我認爲你應該觸發你的複選框的變化事件。 – vitozev