I reckon that this would work:
Code:
$("a").click(function(e) {
e.preventDefault();
$("#someFrame").attr("src", $(this).attr("href"));
$("a").removeClass("active");
$(this).addClass("active");
})
First removing the "active" class from all links, then adding that class to the clicked link.
May I suggest that you give your links e.g. a class name to identify them:
HTML Code:
<p><a href="http://www.youtube.com/embed/Q5im0Ssyyus" class="myButtons">Charlie 1</a></p>
And get them e.g. like this:
That gives you the freedom to add more <a> tags to the page without affecting them too.
Bookmarks