Untitled
Anonymous
javascript
02/24/2024 11:51 PM
244 B
16
Indexable
$('tab').click(function() {
const index = $(this).index();
$('tab, content').removeClass('active');
$(`tab:eq(${index}), content:eq${index}`).addClass('active');
});Editor is loading...
Leave a Comment