Skip to content

Commit

Permalink
Merge pull request #86 from meszaros-lajos-gyorgy/master
Browse files Browse the repository at this point in the history
Added AMD support
  • Loading branch information
SamWM committed Apr 2, 2015
2 parents c35ad2c + b711578 commit d58f9a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions numeric/jquery.numeric.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
* Demo: http://www.texotela.co.uk/code/jquery/numeric/
*
*/
(function($) {
(function(factory){
if(typeof define === 'function' && define.amd){
define(['jquery'], factory);
}else{
factory(window.jQuery);
}
}(function($) {
/*
* Allows only valid characters to be entered into input boxes.
* Note: fixes value when pasting via Ctrl+V, but not when using the mouse to paste
Expand Down Expand Up @@ -336,4 +342,4 @@ $.fn.setSelection = function(o, p)
}
};

})(jQuery);
}));
2 changes: 1 addition & 1 deletion numeric/jquery.numeric.min.js

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

0 comments on commit d58f9a3

Please sign in to comment.