title: How can I get the current directory name in Javascript?
body: <p>I'm trying to get the current directory of the file in Javascript so I can use that to trigger a different jquery function for each section of my site.</p>
  
  <pre><code>if (current_directory) = "example" {
  var activeicon = ".icon_one span";
  };
  elseif (current_directory) = "example2" {
  var activeicon = ".icon_two span";
  };
  else {
  var activeicon = ".icon_default span";
  };
  
  $(activeicon).show();
  ...
  </code></pre>
  
  <p>Any ideas?</p>