title: Add specific class to ul that contains the current page link
body: <p>I have the following HTML code:</p>
  
  <pre><code> &lt;li&gt;&lt;a href="index.php"&gt; Home&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="manageArticles.php"&gt; Contact&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="addArticle.php"&gt; More...&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I need to add the class <code>active</code> to the <code>li</code> that contains the link of the cirrent page.</p>
  
  <p>For axample in the page <code>index.php</code> for the second <code>li</code> tag should added the class active.</p>
  
  <p>I have a script code that gets the current URL:</p>
  
  <pre><code> var currentPageName = document.location.href.match(/[^\/]+$/)[0];
  </code></pre>
  
  <p>But I don't really know what should I do after this (and if it's even possible)..</p>
  
  <p>Wish for help, thanks!</p>