source: branches/testa/js/tab.js @ 23

Last change on this file since 23 was 23, checked in by anonymous, 6 years ago

init

File size: 528 bytes
RevLine 
[23]1jQuery(function($){
2    $('.tab').click(function(){
3        $('.is-active').removeClass('is-active');
4        $(this).addClass('is-active');
5        $('.is-show').removeClass('is-show');
6        // クリックしたタブからインデックス番号を取得
7        const index = $(this).index();
8        Globalx.index = index;
9        Globalx.part = Globalx.parts[index];
10        // クリックしたタブと同じインデックス番号をもつコンテンツを表示
11        $('.panel').eq(index).addClass('is-show');
12    });
13});
Note: See TracBrowser for help on using the repository browser.