jQuery toggleClass example
Toggle class name on click in jQuery
by hbmaam hbmaam
HTML
<div class="mobile-nav">
<ul>
<li>
<div class="link">
<a href="" class="">Investors1</a>
</div>
<div class="link">
<a href="" class="">Investors2</a>
</div>
<div class="link">
<a href="" class="">Investors3</a>
</div>
<div class="link">
<a href="" class="">Investors4</a>
</div>
<div class="link">
<a href="" class="">Investors5</a>
</div>
</li>
<li id="Supportcontainer">
<div style="display: block;">
<div class="link">
<a href="" class="">Support</a>
</div>
</div>
</li>
</ul>
</div>
CSS
.link {
display: inline;
}
.mobile-nav>ul {
display: flex;
}
.mobile-nav>ul>li:nth-child(1) {
flex-grow: 1;
height: 36px;
overflow: scroll;
white-space: nowrap;
}
.mobile-nav>ul>li:nth-child(2) {
height: 36px;
overflow: scroll;
/*white-space: nowrap;*/
}
.mobile-nav>ul>li:nth-child(2)>div {
display: block;
background-color: red
}