datatable - data table conflict with require-jquery.js -
datatable - data table conflict with require-jquery.js -
current application 1 has used require-jquery.js. have implemented jquery info table. working fine when remove "require-jquery.js". when include require-jquery.js getting error below:
error: mismatched anonymous define() module: function ( $ ) {
see structure:
jquery.min.js require-jquery.js jquery.datatables.jsand this:
tickerdashboardtable = $('#tickerdashboardtable').datatable( {} ); i don't know how utilize require-jquery.js. how can resolve issue.
<script data-main="scripts/main.js" src="scripts/jquery.js"></script>
create main.js contains similar to:
require(["jquery", "jquery.alpha", "jquery.beta"], function($) { //the jquery.alpha.js , jquery.beta.js plugins have been loaded. $(function() { $('body').alpha().beta(); }); }); you have phone call scripts utilize "define()" require-jquery api.
http://requirejs.org/docs/jquery.html
jquery datatable requirejs
Comments
Post a Comment