From 0adf521db31264560c1c598e0086ba5b40b6a91f Mon Sep 17 00:00:00 2001 From: eladxxx Date: Fri, 2 May 2014 00:02:54 +0300 Subject: [PATCH] AMD support from Jowin's Datatables-Bootstrap3 plugin. --- integration/bootstrap/3/dataTables.bootstrap.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integration/bootstrap/3/dataTables.bootstrap.js b/integration/bootstrap/3/dataTables.bootstrap.js index de5177f..03f9985 100644 --- a/integration/bootstrap/3/dataTables.bootstrap.js +++ b/integration/bootstrap/3/dataTables.bootstrap.js @@ -1,3 +1,10 @@ +(function (factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery','datatables'], factory); + } else { + factory(jQuery); + } +}(function ($) { /* Set the defaults for DataTables initialisation */ $.extend( true, $.fn.dataTable.defaults, { "sDom": @@ -248,4 +255,4 @@ if ( $.fn.DataTable.TableTools ) { } } ); } - +}));