jQuery plugins

Plugins are used to create a modular part of an application using various elements that can be used in multiple projects. Here is a simple demonstration:

(function( $ ) {
  $.myFunc.showLinkLocation = function() {
    this.filter( "a" ).append(function() {
      return " (" + this.href + ")";
    });
    return this;
  };
}( jQuery ));

Note

For more support on creating custom plugins, you can visit https://learn.jquery.com/plugins/basic-plugin-creation/.

The jQuery community is huge. Developers have made some really great jQuery plugins and extensions that you can use in your projects. All these projects are available free of cost; however, there are some paid options too. The following are some great jQuery plugins:

  • NIVO Slider: This is one of the oldest ...

Get Web Developer's Reference Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.