Skip to content

Commit

Permalink
Make plugin compatible with module loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
jonscottclark committed Nov 13, 2015
1 parent e0be682 commit b5988c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
7 changes: 1 addition & 6 deletions jquery.matchHeight-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions jquery.matchHeight.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
* License: MIT
*/

;(function($) { // eslint-disable-line no-extra-semi
;(function(factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS
module.exports = factory(require('jquery'));
} else {
// Global
factory(jQuery);
}
})(function($) { // eslint-disable-line no-extra-semi
/*
* internal
*/
Expand Down Expand Up @@ -365,4 +377,4 @@
matchHeight._update(true, event);
});

})(jQuery);
});

0 comments on commit b5988c1

Please sign in to comment.