title: Selected state for home page
body: <p>I am trying to create a selected state using jQuery. I have all pages exept for home page as there is no unique page identifier (i.e) www.abcd.co.nz</p>
  
  <p>JS Fiddle here: <a href="http://jsfiddle.net/zangief007/1ta4gxwn/" rel="nofollow">http://jsfiddle.net/zangief007/1ta4gxwn/</a> </p>
  
  <pre><code>if (window.location.href.indexOf("/") &gt; -1) {
      $("header ul li a.home").addClass("tn-selected");
  }
  
  if (window.location.href.indexOf("about") &gt; -1) {
      $("header ul li a.about").addClass("tn-selected");
  }
  
  if (window.location.href.indexOf("links") &gt; -1) {
      $("header ul li a.links").addClass("tn-selected");
  }
  
  if (window.location.href.indexOf("contact") &gt; -1) {
      $("header ul li a.contact").addClass("tn-selected");
  }
  </code></pre>