Attempting to display the active tab in the middle of a list of tabs using only pure javascript, without relying on the document.
List of Tabs:
.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>
Only successful with first 3 tabs, unable to position last 2 tabs correctly as they switch places at the end of the list.
Implementation is being done in Frontity, which does not support the use of document.
Attempted solutions using CSS, but no luck so far with javascript. Any assistance would be greatly appreciated.