If you have a list
On the Server side you'll want to keep track which page you are on. There are many ways you could do this but one way is
<ul>
<li data-link="home">Home</li>
<li data-link="about">About Us</li>
<li data-link="contact>Contact</li>
</ul>
and if using php for example
$(document).ready(function() {
var currentPage = "<?= $page ?>";
$('li[data-link='+currentPage+']').addClass('current-menu-item');
});
Handling which link gets the class 'current-menu-item' is much better on the server side but for a quick example i did it using jquery.
Any time you want something done on page load you can place it in $(document).ready
http://api.jquery.com/ready/
Edit
One quick and easy way of setting $page is in the page requested itself so...
about.php
<?php
$page = "about"
?>
<html>
....
</html>
There are many ways of doing this so you just need to get creative. That's the beauty of programming :)