我对我的脚本的意图是modal
只有在您单击链接后才会显示该对话框。不幸的是,它会在页面加载后立即弹出。我已经包含了一个 jsFiddle 和相关的片段。我究竟做错了什么?
http://jsfiddle.net/rajkumart08/y88WX/25/
jQuery :
$(document).ready(function(){
$(function() {
$('#event-modal').modal({
backdrop: true
});
});
});
HTML:
<div id="event-modal" class="modal hide fade">
<div class="modal-header">
<a class="close" href="#">x</a>
<h3>Modal Heading</h3>
</div>
<div class="modal-body">
<p>Some information</p>
</div>
<div class="modal-footer">
<a class="btn primary" href="#">Primary</a>
<a class="btn secondary" href="#">Secondary</a>
</div>
</div>
<a href="/events/2-fefewfewfe/rsvps" data-backdrop="true" data-controls-modal="event-modal" data-keyboard="true">click to open model<span class="ico join"></span></a>