How can I add class active
to li
a current day of the week?
<ul class="nav nav-tabs nav-justified responsive" id="myTab">
<li class="active"><a href="#resp-tab1">Monday</a></li>
<li><a href="#resp-tab2">Tuesday</a></li>
<li><a href="#resp-tab3">Wednesday</a></li>
<li><a href="#resp-tab4">Thursday</a></li>
<li><a href="#resp-tab5">Friday</a></li>
</ul>
If you add
active
to the root<ul>
element, all children will inherit theactive
class.You can do
to only select
li
elements with the classactive
in your CSS.