0

推特引导模式没有触发......我已经包含了js和CSS......控制台中显示两个错误的原因是什么......

Uncaught TypeError: undefined is not a function bootstrap.js:29
Uncaught SyntaxError: Unexpected token ;

在下面提供我的小提琴

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>
4

1 回答 1

3

您可能应该听听错误的内容:

- $('#event-modal').modal({
-    backdrop: true;
- });

+ $('#event-modal').modal({
+    backdrop: true
+ });

编辑: http: //jsfiddle.net/wT5ZR/4/——fiddle在bootstrap-modal之后包含了 jQuery 。后者取决于前者。

于 2013-03-02T00:17:29.140 回答