Code for beautifying the checkbox and radio controls using jquery and images (packaged and downloaded) _ jquery

Source: Internet
Author: User
The beautification of the checkbox and radio controls implemented by jquery is very good. You can modify images to achieve more beautiful results. :

HTML:

The Code is as follows:



Aaaaaa
Bbbbbb
Ccccc
Ddddd



AAAAAA
BBBBBBBB
CCCCCC
DDDDDD




JS:

The Code is as follows:


$ (Function (){
$ ('# Chklist'). hcheckbox ();
$ ('# Radiolist'). hradio ();
$ ('# BtnOK'). click (function (){
Var checkedValues = new Array ();
$ ('# Chklist: checkbox'). each (function (){
If ($ (this). is (': checked '))
{
CheckedValues. push ($ (this). val ());
}
});
Alert (checkedValues. join (','));
Alert ($ ('# radiolist: checked'). val ());
})
});


It is required to introduce jquery files.
There is also a checkbox plug-in JS file jquery-hcheckbox.js, In the download of the compressed package has the source file and DEMO
Please let me know if you have made more beautiful on this basis ~~
Demo address http://demo.jb51.net/js/jQuery_HCheckbox/index.html
Package
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.