<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-git.js'></script>
<style type='text/css'>
a.active {
color: pink;
}
</style>
<script type='text/javascript'>
$(window).load(function(){
$("a").click(function(){
$('a').removeClass('active');
$(this).addClass("active");
});
});
</script>
</head>
<body>
<a href="#">Link1</a>
<a href="#">Link2</a>
<a href="#">Link3</a>
</body>
</html>
The code above is rendered as follows: