1. Prepare Plugin declaration skeleton:
jQuery.fn.yourmethodname = function(params) { ... };
2. Write your code logic in the below script
(function($) {
$.fn.yourmethodname = function(params)
{ add your code logic here...............}
})(jQuery);
3. Save this file as jquery.yourmethodname.js.
4. Call the method in your HTML file
$("some element").yourmethodname();
No comments:
Post a Comment