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

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

dispaly message for debug

File size: 560 bytes
RevLine 
[25]1function tab_init(){
[23]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');
[27]12        console.log("tab index="+index )
[25]13    })
14}
Note: See TracBrowser for help on using the repository browser.