mirror of
https://github.com/yuanwangokk-1/TV-BOX.git
synced 2025-10-25 02:41:21 +00:00
9 lines
No EOL
294 B
JavaScript
9 lines
No EOL
294 B
JavaScript
$('.tabs').on('click', 'li', function (e) {
|
|
//监听的元素
|
|
let $li = $(e.currentTarget)
|
|
let index = $li.index()
|
|
$li.addClass('active').siblings().removeClass('active')
|
|
|
|
$('.tab-content').children().eq(index)
|
|
.addClass('active').siblings().removeClass('active')
|
|
}) |