Merge pull request #227 from Mickey-P/use_a_require-friendly_AMD_name

Sorting: changed usage to require-friendly amd style for datetime-moment plugin
pull/230/head
Allan Jardine 9 years ago
commit 678fc96786

@ -20,7 +20,13 @@
* $('#example').DataTable(); * $('#example').DataTable();
*/ */
(function($) { (function (factory) {
if (typeof define === "function" && define.amd) {
define(["jquery", "moment", "datatables"], factory);
} else {
factory(jQuery, moment);
}
}(function ($, moment) {
$.fn.dataTable.moment = function ( format, locale ) { $.fn.dataTable.moment = function ( format, locale ) {
var types = $.fn.dataTable.ext.type; var types = $.fn.dataTable.ext.type;
@ -50,4 +56,4 @@ $.fn.dataTable.moment = function ( format, locale ) {
}; };
}; };
}(jQuery)); }));

Loading…
Cancel
Save