Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jQuery 很棒,尤其是它的插件,但我不喜欢在我的 html 中添加很多脚本标签。有没有类似于 dojo.require 的东西?所以我可以更轻松、更清洁地管理这些插件。
jQuery.require 在 1.4 中不存在,它在 1.4 正在开发时提交到树中,但在最终版本之前被删除。
RequireJS是一个特别注意使用 jQuery 的加载器。它源于 dojo.require,但它遵循 CommonJS 习惯用法并针对浏览器内使用进行了优化。
免责声明,我是 RequireJS 的主要开发者。
是的。jQuery.require在 1.4 或1.3中的惰性加载器
jQuery.require