compare last string of the url, with the li's id name
<p>I need to compare the last string of a url with the id of an <code>&lt;li&gt;</code> and if the same then do something. 
In my example below, I first use my code to compare it to a general ID and it works but I also need to target specific ids of the <code>&lt;li&gt;</code>s, need to mention that these <code>&lt;li&gt;</code>s start with a string "filter-", therefore I also need to remove "filter-" then get the last bit of the id and finally compare it to the last string of the url and if the same, do soemthing.. I tried this:</p>

<p>Example url:</p>

<pre><code>url: http://www_example_com/category=.name
</code></pre>

<p>Example html:</p>

<pre><code>&lt;div class="leftNav"&gt;
   &lt;ul id="name"&gt;
      &lt;li id="filter-name"&gt;Lorem&lt;/li&gt;
      &lt;li id="filter-name2"&gt;Lorem&lt;/li&gt;
   &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Before the closing &lt; /head>:</p>

<pre><code>    jQuery(window).load(function() {
       var string = document.location.href.split('=.')[1];
       var stripString = $(".leftNav ul li").attr("id").replace("filter-", "");
       $(".leftNav ul").hide();
       $("#" + string).slideDown("slow");
       if(string == stripString) {
           $("#" + stripString).slideDown("slow");
       }
    });
</code></pre>

<p>Anyone? Thanks</p>
