使用DataTables 的Bootstrap集成时,我在控制台中看到以下错误:
Uncaught TypeError: Cannot read property 'defaults' of undefined (dataTables.bootstrap.js:20)
这会导致分页控件上没有样式.
我可以看到在工厂初始化时,需要运行以下代码:
factory( jQuery, jQuery.fn.dataTable );
Run Code Online (Sandbox Code Playgroud)
然而,jQuery.fn.dataTable正在回归undefined.