未捕获的TypeError:undefined不是函数bootstrap.js:29 未捕获的SyntaxError:意外的令牌;
在下面提供我的小提琴
http://jsfiddle.net/rajkumart08/wT5ZR/2/
<script type="text/javascript">
$(function() {
$('#event-modal').modal({
backdrop: true;
});
});
</script>
<div class="container">
<section>
<div class="row features">
<div class="span6">
<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>
答案 0 :(得分:4)
您应该听错误说明:
- $('#event-modal').modal({
- backdrop: true;
- });
+ $('#event-modal').modal({
+ backdrop: true
+ });
编辑:http://jsfiddle.net/wT5ZR/4/ - 小提琴包括 bootstrap-modal之后的jQuery 。后者取决于前者。