Skip to content

Commit

Permalink
add amd support
Browse files Browse the repository at this point in the history
  • Loading branch information
xwartz committed Mar 16, 2016
1 parent 9e737da commit c7ed6de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/unslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
(function(factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
} else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory(window.jQuery));
} else {
factory(window.jQuery);
}
}(function($) {
Expand Down

0 comments on commit c7ed6de

Please sign in to comment.