Posted on March 12, 2009 - by webmaster
Make jQuery plugin customizable
James Padolsey at learningjquery.com has shown us how to achieve the “optimum level” of customization to jQuery plugin, with few main points:
- Don’t create plugin-specific syntax
- Give full control of DOM elements
- Provide callback capabilities
And few considerations to be double checked:
- Flexibility: How many situations will your plugin be able to deal with?
- Size: Does the size of your plugin correspond to its level of functionality? I.e. Would you use a very basic tooltip plugin if it was 20k in size? – Probably not!
- Performance: Does your plugin heavily process the options in any way? Does this effect speed? Is the overhead caused worth it for the end user?
This entry was posted on Thursday, March 12th, 2009 at 07:55 and is filed under Tutorials. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
