There are plenty of jQuery plug-in available which you can download from repository link at https://jquery.com/plugins
To make a plug-in's methods available to us, we include plug-in file very similar to jQuery library file in the <head> of the document.
Following example shows how to include jquery.plug-in.js plugin −
This is very simple to write your own plug-in. Following is the syntax to create a a method −
jQuery.fn.methodName = methodDefinition;
Here methodNameM is the name of new method and methodDefinition is actual method definition.
The guideline recommended by the jQuery team is as follows −
← Previous Next →
© 2018 BreakInerview