jQuery plugin creating customizable input radio buttons
###DEMO: http://demos.marioiliev.com/radio-buttons/
1. Call the plugin on element containing radio buttons - $(selector).customRadio();
2. Add "data-radio-custom" tag on <div> containing radio buttons and the plugin will run with the default options
If no additional paramters are specified, the plugin will take the radio input value text
Available options for "text:" are: 'empty', 'value', 'title' or custom 'data' type value.
Example: $(selector).customRadio({text: 'data-custom-title'});
$(selector).customRadio({disabled: true});
- the <label> wrapper gets "disabled" class selector
$(selector).customRadio({destroy: true});
Each radio button is wrapped in <label> element with the following class selectors:
"radio_btn"
"selected" (when button is clicked)
"radio_#" ("#" is uniqe number for each radio button)
"customClass:" You can add custom class selector:
- $(selector).customRadio({customClass: 'myclass'});
Each Label contains <span> with the text of the radio button