Click Color--css to table-style button border make table-style buttons (2)

Source: Internet
Author: User

Here first give the production style:

Here you want to change the style for each button in the click of the border, with each and click of the combination to achieve the best but, on the jquery code:

     $ ("#filterMenu a"). each (function () {           //this.id = i;//Set the ID of each a label as the ID
           //i++;             $ (this). Click (function () {              &NB Sp
Set the OnClick event for each a tab                //alert (this.id);                 if ($ (this). Hasclass ("Switchcolor"))         & nbsp
          $ (this) removeclass ("Switchcolor");                 else {                &NB Sp   $ ("#filterMenu a"). each (function () {                    &NBSP ;


  $ (this). Removeclass ("Switchcolor");


                   }           &NBsp
        $ (this) addclass ("Switchcolor");
                (           });        });
The style simply provides one more switchcolor:

. Switchcolor {
        
           outline:1px solid #ff4400;
        
        }

Other HTML to make table-style buttons like the first CSS written before:

  <!--write Filtmenu here--> <div id= "Filtermenu" > <div class= "Content" > <div class= ' filter left ' > <a id= ' All ' class= ' Filterbutton ' ><span> all <span class= ' filt Erbuttonnumber "> </span></span></a> <a id=" Bondtype "class=" Filterbutton "><sp An> bond type <span class= "Filterbuttonnumber" > (a) </span></span></a> <a id= "Settoopen "Class=" Filterbutton "><span> set open debt <span class=" Filterbuttonnumber "> () </span></span> </a> </div> <div class= "Filter Middle" > <a id= "stocktype" class= "
            Filterbutton "><span> Stock type <span class=" Filterbuttonnumber "> () </span></span></a> <a id= "Qdiitype" class= "Filterbutton" ><span>qdii<span class= "Filterbuttonnumber" > (a) </span&
           Gt;</span></a> </div> <div class= "filter Right" > <a id= "hybridtype" class= "Filterbutton" >< Span> hybrid <span class= "Filterbuttonnumber" > (a) </span></span></a> <a id= "Breakeve Ntype "class=" Filterbutton "><span> Capital Preservation type <span class=" Filterbuttonnumber "> () </span></span ></a> </div> </div> </div>



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.