Note that there are some explanatory texts on larger screens.

plurals
  1. POActive links jquery superfish
    primarykey
    data
    text
    <p>I have a question. I use jquery superfish menu with the following structure</p> <pre><code>&lt;div id="menu" class="ge-navigation-item"&gt; &lt;!-- navigation --&gt; &lt;ul id="test" class="sf-menu sf-vertical sf-js-enabled sf-shadow"&gt; &lt;li&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="index.html"&gt;Index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;menu item&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;menu item&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="proef.html"&gt;menu item&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="index.html"&gt;index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;menu item&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="page-fullwidth.php"&gt;Page - Full Width&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="showcase.php"&gt;Showcase&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;!-- /navigation --&gt; &lt;/div&gt; </code></pre> <p>what I want is that clicking on a link the menu structure will be visible</p> <p>So clicking on index.html will set a link on all links with href index.html But clicking on proef.html will set an active class on href proef.html - Page - About</p> <p>So far I have tried this but with bad results</p> <pre><code>var path = window.location.toString().split("/") path = path[path.length - 1] //alert (path); if (path) $("#test a[href='" + path + "']").addClass("actief"); $("#test ul li:has(a) a[href='" + path + "']").parent().parent().parent().addClass("actief"); </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