With the ever-increasing importance of mobile, performance on the web has never been more critical. Because of its popularity, jQuery is often targeted as too big because of its size.
The good news is, as of jQuery 2.1, jQuery uses AMD to organize its dependencies internally. This means you can use AMD to load individual pieces of jQuery, and not the whole library. In this article you’ll see which jQuery modules are available, and how to use them in an AMD context. For each, I’ll show how many bytes you save by using an AMD approach. Finally, we’ll look at how to write jQuery plugins that leverage these new modules.
Your new post is loading...