jquery Summary 7

Source: Internet
Author: User

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">{margin:0px;padding:0px;} Body{font-size:12px;}        . box{margin:10px;padding:10px;} . Box h3{margin:10px 0px;border-BOTTOM:1PX Solid red;padding-bottom:10px;} . Box P{line-height:20px;}        . tabbox{margin:10px;} . Tabbox. tabhead{float: left;list-style:none;margin-right:-1px;} . Tabbox. Tabhead Li{width:80px;height:30px;cursor:pointer;line-height:30px;padding:0px 5px;border:1px solid #aaccff; margin-bottom:-1px;border-right:0px;} . Tabbox. Tabhead Li.selected{background-color: #aaccff; color:white;font-Weight:bold;} . Tabbox. tabcontent{float: left;border:1px solid #aaccff;p adding:10px;min-height:200px;width:600px;background-color: #aaccff;} . Tabbox. tabcontent Div{display:none;line-height:20px;}            . tabbox. Tabcontent Div.selected{display:block;} </style> <script type= "Text/javascript" >$ (function () {$ (". Tabhead Li"). Click (function () {$ (". Tabhead li"). Removeclass ("Selected"); $( This). AddClass ("Selected"); var index= $ (". Tabhead li"). Index ($ ( This)); $(". Tabcontent>div"). Removeclass ("selected")); $(". Tabcontent>div"). EQ (index). addclass ("Selected");        });    }); </script>class= "box" > complete tab switching, where HTML and CSS are given, just write the corresponding JS code to</p> </div> <divclass= "Tabbox" > <ulclass= "Tabhead" > <liclass= "Selected" > tab one </li> <li> tab two </li> <li> tab three </li> <li > Tabs four </li> </ul> <divclass= "Tabcontent" > <divclass= "Selected" > Content one </div> <div> content two </div> <div> content three </div> < Div> content four </div> </div> </div></body>

jquery Summary 7

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.