title: JQuery Detect If in Homepage and Homepage PLUS url Variables
body: <p>I am using this code to detect the homepage and it works great:</p>
  
  <pre><code>var url= window.location.href;
  if(url.split("/").length&gt;3){
      alert('You are in the homepage');
  }
  </code></pre>
  
  <p>My problem is that I also need to detect if the url has variables for example:</p>
  
  <pre><code>mysite.com?variable=something
  </code></pre>
  
  <p>I need to also detect if the url has variables on it too </p>
  
  <p>How can I do this?</p>