title: how to do conditions with in jQuery with str.search() or similiar?
body: <p>i am making a script to filter the listing of posts in wordpress with checkboxes, what it is suppost to do is initially grab the link in the adress bar (window.location) and play with it and make conditions to know what checkboxes to be active or not, and the second part on the submit to send the right link to window.location in order to filter accordingly to the sellection of the user..... i'm stuck in the part where i wanted to check the window.location to define the checked/unchecked, but i'm having a hard time using the <code>str.search()</code> or <code>str.match()</code> or the othes on the if's:</p>
  
  <p>tryed like this with all the String Object Methods from javascript:</p>
  
  <pre><code>var str=window.location;
  var res=str.search("example");
  
  if (res!=null) { alert(res) }
  </code></pre>
  
  <p>I want to check if the word "example" is present in the adress bar in order to know if categorie or tag is active, been a few days around this little detail o.O</p>