Module: Radio


Add support for styling input radio fields. A custom element is added before the browser default input radio field, The valued is binded to the default browser radio field. When clicking on the custom element they will updated the default input radio and vise versa. Updates on the browser default field will also trigger updates on the custom input field. Options can be passed to extend the defaults.


var DEFAULTS = {
     active: true, // active by default
     ready: function() {}, // callback when module is ready.
     customEle: 'a', // default element for handle.
     containerEle: 'div', // default element for container.
     autoHide: true, // will auto hide html element by default
     classPrefix: 'custom-', // prefix used for class.
     hideCss: { // styles can be overwritten or added.
         position: 'absolute',
         left: '-9999px'
     element: obj, // input radio field.
     events: [], // custom events can be added.
     validators: [] // custom validators can be added.