title: Add ".active" class to the current page's link in a menu using jQuery or PHP
body: <p>I need to add <code>.active</code> class on active task's menu link on the page. I am working on localhost, here are few example URLs:</p>
  
  <pre><code>http://localhost/webapp/index.php?task=validate
  http://localhost/webapp/index.php?task=register
  </code></pre>
  
  <p>and the structure of the menu:</p>
  
  <pre><code>    &lt;div class="menu"&gt;
         &lt;ul class="sf-menu"&gt;
            &lt;li&gt;&lt;a href="index.php"&gt;Inicio&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="?task=validator"&gt;Validar&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="?task=register"&gt;Registro&lt;/a&gt;&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/div&gt;
  </code></pre>