forked from albertba/Advertisement_Panel
12 lines
341 B
JavaScript
12 lines
341 B
JavaScript
let tab_buttons = $( ".tab-button" )
|
|
let tab_containers = $( ".tab-container" )
|
|
|
|
tab_buttons.on( "click", function() {
|
|
let id = $( this ).attr( "id" )
|
|
tab_buttons.removeClass( "active" )
|
|
tab_containers.removeClass( "active" )
|
|
$( this ).addClass( "active" )
|
|
console.log( id )
|
|
$( "#tab-" + id ).addClass( "active" )
|
|
})
|