Note that there are some explanatory texts on larger screens.

plurals
  1. POAny suggestions for how to create this type of Navigatio
    primarykey
    data
    text
    <p>If you have some Javascript experience I'd appreciate some help.</p> <p>I'm having an issue trying top create a tabbed menu that looks like the one referenced in the screenshot below.</p> <p><img src="https://i.stack.imgur.com/v86Mp.png" alt="enter image description here"></p> <p>Basically, because I need to include a full width horizontal line below the heading tab, I am unable to get the first tab to remove it's active styling once one of the other tabs is removed.</p> <p>So my question is: how can I separate the first tab from the others with a full length <hr /> without creating two different menus.</p> <p>BTW, I am aware this is a confusing explanation and understand that I am probably doing this completely wrong, but that's why I am looking for your help :)</p> <p>Here is how I am trying to do this so far:</p> <pre><code>&lt;script&gt; $(document).ready(function() { /* Tabs Activiation ================================================== */ var tabs = $('.tabs'); tabs.each(function(i) { //Get all tabs var tab = $(this).find('&gt; a'); tab.click(function(e) { //Get Location of tab's content var contentLocation = $(this).attr('href'); //Let go if not a hashed one if(contentLocation.charAt(0)=="#") { e.preventDefault(); //Make Tab Active tab.removeClass('active'); $(this).addClass('active'); //Show Tab Content &amp; add active class $(contentLocation).show().addClass('active').siblings().hide().removeClass('active'); } }); }); }); &lt;/script&gt; &lt;!-- Tabs --&gt; &lt;nav id="tab-nav" class="grid3"&gt; &lt;h1 class="tabs"&gt; &lt;a class="active" href="#tab1"&gt;Tab 1 (H1)&lt;/a&gt; &lt;/h1&gt; &lt;/nav&gt; &lt;hr /&gt; &lt;!-- Tabs --&gt; &lt;nav id="tab-nav" class="grid3"&gt; &lt;div class="tabs"&gt; &lt;a href="#tab2"&gt;Tab 2&lt;/a&gt; &lt;a href="#tab3"&gt;Tab 3&lt;/a&gt; &lt;/div&gt; &lt;/nav&gt; &lt;!-- Tab Content --&gt; &lt;ul class="tabs-content grid6"&gt; &lt;li class="active" id="tab1"&gt;Tab 1 Content&lt;/li&gt; &lt;li id="tab2"&gt;Tab 4 Content&lt;/li&gt; &lt;li id="tab3"&gt;Tab3 Content&lt;/li&gt; &lt;/ul&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload