/*EMSegmentedControl.js Description: A drop-in replacement for standard input radio matrices, that creates a toggleable segmented control. Based on work from : Collin Henderson - http://syropia.net - [email protected] Modification : Yves-Gael Billet Version: 1.0
What is EMSegmentedControl?
EMSegmentedControl is a drop-in replacement for standard HTML radio groups that aims at the idea of selectable segments instead of radio buttons.
What is EMSegmentedControlExtend?
EMSegmentedControlExtend is based on EMSegmentedControl (Collin Henderson). It now support checkbox.
Difference between radiobutton and checkbox ?
Radio buttons allow only one selection whereas Checkboxs allow multiple selection.
Neat! How do I use it?
- Be sure to include the Jquery library, as well as the EMSegmentedControl javascript, and css file in your tag. Make sure you load Jquery before you load EMSegmentedControl.
- Now you must initialize the plugin. You're actually going to apply the plugin to a containing
<div>
. So make sure to wrap each radio group in a div tag and give it a class or id. Please see the demo page on proper structure.
I can't see my original radio buttons anymore. How is the value going to be stored?
Fear not, your radio buttons are just hidden, and the plugin is controlling their state. All values will be captured, just like using a regular radio group.
I wanna make it fit my site!
Cool, everything is drawn in CSS3, so hop in to the CSS file and go nuts.