Created
April 7, 2014 15:12
-
-
Save dossy/10022176 to your computer and use it in GitHub Desktop.
Loading just jquery.ui.resizable with requireJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// http://matznermatzner.de/en/bernd/2013/11/loading-non-amd-modules-requirejs-part-1-jquery-ui/ | |
requirejs.config({ | |
paths: { | |
'jquery.ui.core': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.core.min', | |
'jquery.ui.mouse': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.mouse.min', | |
'jquery.ui.resizable': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.resizable.min', | |
'jquery.ui.widget': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.widget.min', | |
}, | |
shim: { | |
'jquery.ui.core': ['jquery'], | |
'jquery.ui.mouse': ['jquery.ui.widget'], | |
'jquery.ui.resizable': ['jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget'], | |
'jquery.ui.widget': ['jquery'], | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment