dataTables and requireJS
dataTables and requireJS
Hi
I have want to know how to use datatables together with requireJS.
This is in main.js
require.config({
paths: {
'jquery': 'libs/jQuery.2.0.3'
}
});
require(['jquery', 'plugins/jquery-dataTables'], function($, dataTable) {
'use strict';
// This function is not excecuting
$('.tablesorter-js').dataTable();
});
and in jquery-dataTables.js
I wrap all the code in
define(['jquery'], function ($) {
});
What am I missing ?
I have want to know how to use datatables together with requireJS.
This is in main.js
require.config({
paths: {
'jquery': 'libs/jQuery.2.0.3'
}
});
require(['jquery', 'plugins/jquery-dataTables'], function($, dataTable) {
'use strict';
// This function is not excecuting
$('.tablesorter-js').dataTable();
});
and in jquery-dataTables.js
I wrap all the code in
define(['jquery'], function ($) {
});
What am I missing ?
This discussion has been closed.