title: jquery active class to menu item based on current url
body: <p>I have the following code that should add an active css class to the menu item if menu item url == current url:</p>
  
  <pre><code>$("#accordion a").each(function() 
  {   
      if (this.href.search(window.location.hostname) != -1)
      {
          $(this).addClass("active-sidebar-link");
      }
  });
  </code></pre>
  
  <p>but this adds the class to all the menu items. any tips?</p>