Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does jQuery have an equivalent to dojo.require?

jQuery is great especially its plugin but I do not like to add a lot of script tags in my html. Is there something similar to dojo.require? So I can manage those plugins easier and cleaner.

like image 669
xiao 啸 Avatar asked Jan 22 '23 23:01

xiao 啸


1 Answers

jQuery.require does not exist in 1.4, it was in an commit to the tree while 1.4 was being developed but removed before the final release.

RequireJS is a loader that has given special care to work with jQuery. It has its roots in the dojo.require, but it follows CommonJS idioms and optimized for in-browser use.

Disclaimer, I am the main developer of RequireJS.

like image 61
jrburke Avatar answered Jan 31 '23 13:01

jrburke