Common Tab switching effects in js

Source: Internet
Author: User
The following small series will bring you a common Tab switching effect (recommended) in js ). I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at the small series. I wish you a pleasant game. The following small series will provide you with a common Tab switching effect (recommended) in js ). I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at the small Editor and wish you a pleasant game.

As follows:

  
   Tab      

Handsome girl, pet, film, hero league, music

  • Jason Shi tanson is arrogant and cool.

    Jason Shi tanson is arrogant and cool.

    Tom Cruise

    Tom Cruise

    Qifu low-key luxury with Connotation

    Qifu low-key luxury with Connotation

  • Female and female

    Female and female

    Female toot mouth scissors

    Female toot mouth scissors

    Beautiful, stylish, small, fresh

    Beautiful, stylish, small, fresh

  • 666 pets each

    666 pets each

    666 pets each

    666 pets each

    666 pets each

    666 pets each

  • Classic in the Harry Potter series

    Three dumbys and a click on the left.

    Transformer series

    The little Lori in qianxun's dream is so fresh

    Alimama, my alimama

    A ganzheng believes that a Gump is still the argan.

  • He's daughter-in-law

    The girl of darkness, Lori.

    I'm the best player in Explorer games

    Individual and all-around

    Timoti has millions of deaths and millions of deaths every day ..

    Don't zoom in on me

  • To be developed...

Script var title = document. getElementById ('title'); var content = document. getElementById ('content'); var spans = title. getElementsByTagName ('span '); var lis = content. getElementsByTagName ('lil'); for (var I = 0; I <spans. length; I ++) {spans [I]. index = I; spans [I]. onclick = function () {for (var j = 0; j <spans. length; j ++) {spans [j]. className = ''; lis [j]. className = '';} this. className = 'select'; lis [this. index]. className = 'show';} script

The key of this Code is the last two for traversal and this pointer. The first for traversal is to add click events for each span button, the second for traversal is to determine which button is currently clicked, and the corresponding content is well controlled and hidden.

The Tab switching effect (recommended) commonly used in this js article is all the content shared by Alibaba Cloud xiaobian. I hope you can give us a reference and support PHP Chinese network.

For more articles about the commonly used Tab switching effect in js, refer to PHP Chinese network!

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.