http://www.bootcss.com/p/icheck/
1. Take a look at the demo downloaded online
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><Metaname= "keywords"content= "JS code, other code, JS ad code, JS effect Code" /><Metaname= "description"content= "jquery Custom check box checkbox and radio box Radio style plug-in icheck.js download" /><title>jquery Custom check box checkbox and radio box Radio style plug-in icheck.js download</title><Linkhref= "Css/square/blue.css"rel= "stylesheet"> <!---style---><Scriptsrc= "Js/jquery.js"></Script> <!---Jquery---><Scriptsrc= "Js/icheck.min.js"></Script> <!----plugins----></Head><Bodystyle= "Text-align:center;"><!--Code Start -<Divstyle= "margin:30px;">Type=checkbox, Multi-choice</Div><inputtype= "checkbox"><inputtype= "checkbox"checked><Divstyle= "margin:30px;">Type=radio, single-choice</Div><inputtype= "Radio"name= "ICheck"><inputtype= "Radio"name= "ICheck"checked><Divstyle= "margin:30px;">Prohibit selection</Div><inputtype= "Radio"name= "ICheck"ID= "Example"><Script>
Initialization
$ (document). Ready (function(){ $('input'). ICheck ({checkboxclass:'Icheckbox_square-blue', //note the correspondence between square and blue for Type=checkboxRadioclass:'Iradio_square-blue', //for Type=radioIncreasearea:'20%' //increase the area you can click });});//Check Event Bindings$('input'). On ('ifchecked', function(Event) {alert ('it's been selected.');});//Uncheck Event Bindings$('input'). On ('ifunchecked', function(Event) {alert ('was canceled.');});//Prohibit selection$('#example'). ICheck ('Disable');</Script><!--End of Code - </Body></HTML>
Initialization
$ (document). Ready (function () {$ ('input'). ICheck ({checkboxclass:'Icheckbox_square-blue',//note the correspondence between square and blue for Type=checkboxRadioclass:'Iradio_square-blue',//for Type=radioIncreasearea:'20%' //increase the area you can click });});
To bind an event using the on () method:
$ ('input'). On ('ifchecked'function(event){ Alert (event.type + ' callback '); });
Event name |
Use time |
Ifclicked |
The user clicked on a custom input box or a label associated with it |
Ifchanged |
The checked or disabled state of the input box has changed |
Ifchecked |
The status of the input box changes to checked |
Ifunchecked |
Checked state is removed |
Ifdisabled |
Input box status changed to disabled |
Ifenabled |
Disabled state is removed |
ifcreated |
The Icheck style is applied to the input box |
Ifdestroyed |
Icheck style is removed |
ICheck. js various plugins fuck Javascript