RequireJS Tutorial
RequireJS Useful Resources
Selected Reading
- RequireJS - Plugins
- RequireJS - CommonJS
- RequireJS - Dojo
- RequireJS - NodeJS
- RequireJS - jQuery
- RequireJS - Optimizer
- RequireJS - Defining Function
- RequireJS - AMD Modules
- RequireJS - Configuration
- RequireJS - Environment Setup
- RequireJS - Overview
- RequireJS - Home
RequireJS Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
RequireJS - jQuery
RequireJS - jQuery
RequireJS uses jQuery as another dependency and registers as named module jquery in lowercase and by default, also registers itself by using the global functions $ and jQuery while using the AMD/RequireJS.
Loading jQuery
require([ jquery ], function($) { //code here }
You can load multiple and custom pbraries along with the jQuery as shown below −
require([ custom_pbrary_path , jquery ], function(load_pbrary,$) { //related code of $ and load_pbrary });
The following table shows the use of jQuery with RequireJS for specifying their dependencies.
Sr.No. | Types & Description |
---|---|
1 | jQuery uses shim configuration to define the dependencies for jQuery plugins. |
2 | jQuery uses CDN to define the dependencies for jQuery plugins. |