Creating jQuery UI plugins

Besides the official documentation, are there any recommended resources for learning how to build jQuery plugins. I am particularly interested in creating plugins for UI libary.

I looked at some of the official sources, but I found that they all look very different. Many of them are not very well commented, and it’s hard to say which blocks of code are part of the essential structure and what exactly relates to a particular plugin.

If there are no good resources for this yet, can someone tell me on what basic structure should I start work when writing a plugin from scratch?

+5
source share
4 answers

Tutorial in jQuery Training

Learning jQuery is a very useful site and has an excellent plugin development tutorial .

One of the principles that I really liked is to create default settings that users can override .

So maybe you can say $ (this) .highlight (), and by default it will be highlighted in blue. Or you can say $ (this) .highlight ("green") and it will highlight green.

But you must also say:

   $(this).highlight({
    foreground: 'red'
    });

... and by default red will stand out , and then .

Other good resources

+3

Manning Publications jQuery, jQuery ? , .

+1

Chapter 7 JQuery in action is a jQuery extension with custom plugins and should provide you with the information you need.

+1
source

Try this one . In this tutorial, you will create your own plugin step by step.

+1
source

All Articles