Category: When jQuery is not enough… plugins to the rescue!

  • Conclusion

    This lesson introduced you to writing reusable code that extends jQuery. Writing your own code as extensions to jQuery has a number of advantages. Not only does it keep your code consistent across your web application regardless of whether it’s employing jQuery APIs or your own, but it also makes all of the power of…

  • Writing custom utility functions

    In this app, we’ve used the term utility function to describe functions defined as properties of jQuery (and therefore $). These functions are usually intended to act on non-element JavaScript objects or to perform some other operation that doesn’t specifically operate on any objects. Some examples of utility functions you’ve seen are $.each() and $.noConflict(). In this section, you’ll learn how to add your…

  • Demo: creating a slideshow as a jQuery plugin

    For our more complex plugin example, you’re going to develop a jQuery method that allows a web developer to whip up a quick slideshow page. You’ll create a jQuery plugin, which you’ll name Jqia Photomatic, and then you’ll whip up a test page to put it through its paces. When complete, this test page will…

  • Maintaining chainability

    Throughout this app you’ve made a massive use of jQuery chaining to perform several operations in one statement. Your methods don’t return a value, so undefined (which is the default) will be returned. Because of this, a developer using your extension can’t call any other jQuery method after calling jqiaContextMenu(). The change required to maintain chainability in a…

  • Namespacing events and data

    In lesson 6 you learned about the possibility of namespacing events. This feature is particularly useful when authoring plugins. It’s a best practice that plugins that attach handlers to events namespace them. Following this principle, if you later need to unbind them, you can perform the action without fear of interfering with other plug-ins that may be…

  • The jQuery plugin authoring guidelines

    This section contains a set of guidelines to help you to name and structure a plugin. These guidelines ensure not only that your code plugs into the jQuery architecture properly, but also that it’ll work and play well with other jQuery plugins and even other JavaScript libraries. Here we’ll outline the basics and the best…

  • Great plugins for your projects

    This section gives you a short list of some of the most popular and most used jQuery plugins that you can use in your projects to perform common tasks. This isn’t a comprehensive list by any means, but it’s a good start. The first plugin we suggest is typeahead.js. It’s a fast and full-featured autocomplete…

  • Where to find plugins

    After several months’ hard work, the jQuery team announced the release of the new (improved!) jQuery plugin registry with an official blog post published on January 16, 2013. The new registry, accessible at, replaced the old one that was affected by a lot of problems. But circa two years later, the new registry was set…

  • Why extend jQuery?

    If you’ve been paying attention while reading through this app, you undoubtedly have noted that adopting jQuery for use in your pages has a profound effect on how a script is written within a page. jQuery promotes a certain style for a page’s code: generally forming a jQuery collection and then applying a jQuery method,…

  • When jQuery is not enough… plugins to the rescue!

    This lesson covers Over the course of this app, you’ve seen that jQuery gives you a large toolset of useful methods and utility functions, and you’ve also seen that you can easily tie these tools together to give your pages whatever behavior you choose. Sometimes that code follows common patterns you’ll want to use again…