jquery imitates radio button selection effect _jquery

Source: Internet
Author: User

Just started to learn jquery, the work of some CSS forms in the button beautification is very troublesome, so think of using jquery to replace, check box jquery is easy, is a simple style switch effect, using the Toggleclass () method.

The Radio box doesn't know what to do, because when you select one in the Radio box, the other must remove the style, and if 2 of the radio boxes are in siblings (), you can find the other selection box removal style directly. Given that your job is a circular list pattern, each <li> has a single marquee, and you don't find the easy way to use the parent () in jquery.

CSS is as follows:

<! DOCTYPE html>  

The effect is as follows: You can only add a style at any rate, and the right text changes with the click.

The above is a small series to introduce the jquery to imitate the radio button selection effect, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.