0
我的DataTable的插件不工作,我不知道爲什麼請幫助...數據表錯誤:未捕獲的ReferenceError:jQuery是沒有定義
試圖調試在谷歌克羅默的JavaScript,我發現這個錯誤時,我知道,如果它們發生衝突
未捕獲的ReferenceError:jQuery的沒有定義本地主機:49769 /腳本/ main.js:1個 未被捕獲的錯誤:未發現圖形容器元件本地主機:49769 /腳本/模板/ JS /插件/莫里斯/莫里斯。 min.js:1 根據DOM(http://dom.spec.whatwg.org/#dom-range-detach),'Range.detach'現在爲空操作。
正在使用MVC5開發應用程序
這是主要的js
jQuery(function ($) {
$(document).ready(function() {
var table = $("#customers").DataTable();
});
});
<!-- add new calendar event modal -->
<!-- jQuery 2.0.2 -->
<script src="/Scripts/Template/js/jquery-1.11.1.min.js"></script>
<script src="/Scripts/Template/js/jquery.min.js"></script>
<script src="/Scripts/main.js"></script>
<!-- DATA TABES SCRIPT -->
<script src="/Scripts/Template/js/plugins/datatables/jquery.dataTables.js"></script>
<!-- jQuery UI 1.10.3 -->
<script src="/Scripts/Template/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<script src="/Scripts/Template/js/bootstrap.min.js" type="text/javascript"></script>
<!-- Morris.js charts -->
<script src="/Scripts/Template/js/raphael-min.js"></script>
<script src="/Scripts/Template/js/plugins/morris/morris.min.js" type="text/javascript"></script>
<!-- Sparkline -->
<script src="/Scripts/Template/js/plugins/sparkline/jquery.sparkline.min.js" type="text/javascript"></script>
<!-- jvectormap -->
<script src="/Scripts/Template/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js" type="text/javascript"></script>
<script src="/Scripts/Template/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js" type="text/javascript"></script>
<!-- jQuery Knob Chart -->
<script src="/Scripts/Template/js/plugins/jqueryKnob/jquery.knob.js" type="text/javascript"></script>
<!-- daterangepicker -->
<script src="/Scripts/Template/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<!-- datepicker -->
<script src="/Scripts/Template/js/plugins/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="/Scripts/Template/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
<!-- iCheck -->
<script src="/Scripts/Template/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="/Scripts/Template/js/AdminLTE/app.js" type="text/javascript"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="/Scripts/Template/js/AdminLTE/dashboard.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="/Scripts/Template/js/AdminLTE/demo.js" type="text/javascript"></script>
<script src="/Scripts/modernizr-2.6.2.js"></script>
這是我所有的腳本參考
這裏是表
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<br />
<div class="box-header row-fluid">
<div class="col-lg-12">
<div class="span2 pull-right">
<button class="btn btn-primary btn-sm">Enable</button>
<button class="btn btn-warning btn-sm">Disable</button>
<button class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div><!-- /.box-header -->
<div class="box-body table-responsive">
<table id="customers" class="table table-bordered table-striped">
<thead>
<tr>
<th><input type="checkbox"></th>
<th>Customer Name</th>
<th>Phone Number</th>
<th>Email</th>
<th>Location</th>
<th>Registration Date</th>
<th>Customer Status</th>
</tr>
</thead>
<tbody>
<tr>
<th><input type="checkbox"></th>
<td>Mike Ebon</td>
<td>0802647281243</td>
<td>[email protected]</td>
<td>Surulere Lagos, Country</td>
<td>10/13/2014</td>
<td><span class="label label-success">Approved</span></td>
</tr>
<tr>
<th><input type="checkbox"></th>
<td>Mike Ebon</td>
<td>0802647281243</td>
<td>[email protected]</td>
<td>Surulere Lagos, Country</td>
<td>10/13/2014</td>
<td><span class="label label-success">Approved</span></td>
</tr>
<tr>
<th><input type="checkbox"></th>
<td>Mike Ebon</td>
<td>0802647281243</td>
<td>[email protected]</td>
<td>Surulere Lagos, Country</td>
<td>10/13/2014</td>
<td><span class="label label-danger">Denied</span></td>
</tr>
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
</div>
</section>
它後,但它仍然沒有響應 – user3811481 2014-08-28 08:21:54
它是否工作,如果你用$替換JS中的'jQuery'? – vpzomtrrfrt 2014-08-28 12:59:03