title: Active links jquery superfish
body: <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>