How do I assign class="active"
to a link element when another link is clicked?
i.e I have:
<a href="hello.php"></a>
<a href="world.php"></a>
But when the second link is clicked, I want to have:
<div id="bing">
<a href="hello.php" class="active"></a>
</div>
<a href="world.php"></a>
Basically I was thinking something like:
var foo = $(this).attr("href");
if ($(this).attr("href") == "hello.php")
//insert code to assign that link the class="active"