I am trying to figure out how to change the parent div container background color when clicking a tab. I want to have it so that when a tab is active it adds a class to the parent div. Each active tab would add different bg color to the parent.
This is what I would like to do.
I tried it in your console, check this
$
is not assigned in your code, that's why I changed tojQuery
hereYou can use a attribute
data-color
to each tab and then on click you can switch themadd on-click event to every tab.