source:
branches/testa/js/tab.js
@
23
| Last change on this file since 23 was 23, checked in by anonymous, 6 years ago | |
|---|---|
| File size: 528 bytes | |
| Line | |
|---|---|
| 1 | jQuery(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.
![(trac.ini の [header_logo] セクションを設定してください)](/python/trac/Flist/chrome/common/trac_logo_mini.png)