I am using tabs and I want to show active tab in the middle of the tabs using pure javascript without using document.
Tabs listing:
.tablist li:nth-of-type(1) { order: 3; }
.tablist li:nth-of-type(2) { order: 2; }
.tablist li:nth-of-type(3) { order: 5; }
.tablist li:nth-of-type(4) { order: 4; }
.tablist li:nth-of-type(5) { order: 1; }
.tablist li.tabs.tab-active{ order: 3 !important }
<ul class="tablist">
<li class="tabs">Marketing</li>
<li class="tabs">Manufacturing</li>
<li class="tabs tab-active" >Municipalities</li>
<li class="tabs">Retail</li>
<li class="tabs">Healthcare</li>
</ul>
I have tried but it only helps with first 3 tabs but not with last 2 tabs last two tabs switch on last positions only.
I am trying to use this functionality in Frontity so it doesn't support document.
I have only tried css not found any solution using javascript.
Please help me out for this issue.