Skip to content

Commit d58f9a3

Browse files
committed
Merge pull request SamWM#86 from meszaros-lajos-gyorgy/master
Added AMD support
2 parents c35ad2c + b711578 commit d58f9a3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

numeric/jquery.numeric.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
* Demo: http://www.texotela.co.uk/code/jquery/numeric/
99
*
1010
*/
11-
(function($) {
11+
(function(factory){
12+
if(typeof define === 'function' && define.amd){
13+
define(['jquery'], factory);
14+
}else{
15+
factory(window.jQuery);
16+
}
17+
}(function($) {
1218
/*
1319
* Allows only valid characters to be entered into input boxes.
1420
* Note: fixes value when pasting via Ctrl+V, but not when using the mouse to paste
@@ -336,4 +342,4 @@ $.fn.setSelection = function(o, p)
336342
}
337343
};
338344

339-
})(jQuery);
345+
}));

numeric/jquery.numeric.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)