Home > Code, JQuery > JQuery Plugin Mechanism

JQuery Plugin Mechanism

Extending the Library

Another excellent article on extending JQuery.

The jQuery library is centered on a root object, which exposes a number of methods. After doing whatever tasks it was called to do, each method just returns the instance of its parent object. In this way, a new call to another method can be arranged on the same expression.

(function( $ ){
 $.fn.yourPluginName = function() {
 // your code here

Read the rest of the article http://drdobbs.com/web-development/229403172

Categories: Code, JQuery
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: