title: jQuery do something depends of url path
body: <p>I need to add css class to all url's, that begining from example.com/mine/first. I know how add classes from root address, but I can't do this for /mine/first path.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function(){
      var pathnameArr = location.pathname.split('/');
      switch (pathnameArr[1]) {
   case 'mine/first':
    $(".container").addClass('dontshow');
   break;
   case 'mine/second':
    $(".container").addClass('dontshow');
   break;
   }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks.</p>