title: jquery how to check if url contains word?
body: <p>I want to be able to check if url contains the word catalogue. </p>
  
  <p>This is what i am trying...</p>
  
  <pre><code> $(document).ready(function () {
          if (window.location.href.indexOf("catalogue"))
          {
              $("#trail").toggle();
          }
      }); 
  </code></pre>
  
  <p>The url of the site could be..</p>
  
  <pre><code>http://site.co.uk/catalogue/
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>http://site.co.uk/catalogue/2/domestic-rainwater.html
  </code></pre>
  
  <p>etc.</p>
  
  <p>But it doesn't work. Can somebody please point out where I'm going wrong?</p>