Method for jQuery plugin

Sor keneth

New Member
I'm trying to make a jQuery plugin for custom checkboxes and radio buttons.\[code\](function($){ $.fn.checkboxRadio = function(options) { var defaults = some; ... return this.each(function() { var button = $(this); ... }); }})(jQuery);\[/code\]It can be used now by \[code\]$('input').checkboxRadio(options);\[/code\]How do I add a method \[code\]check\[/code\] without changing current scope, to make a possible usage of something like \[code\]$('input').checkboxRadio('check')\[/code\]?How to handle a custom method and get its name inside my plugin?
 
Back
Top