Skip to content

Commit 33e0aac

Browse files
author
interestincode
committed
Wait for dataTables script to load
Also wait for the dataTables script to load, allows placing jquery.dataTables.js in the scripts section at the end of the layout page, to avoid needing to put the jQuery and dataTables scripts in <head>
1 parent f0866ef commit 33e0aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mvc.JQuery.Datatables.Templates/Views/Shared/DataTable.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
<script type="text/javascript">
3535
(function setDataTable() {
36-
if(!window.jQuery) {
36+
if(!window.jQuery || !$.fn.DataTable) {
3737
setTimeout(setDataTable, 100);
3838
return;
3939
}

0 commit comments

Comments
 (0)