I wanted to know if there is a way to change the children while isolating the one that is currently clicked, so far I have a simple workaround with the click event handler inside:
$(function() { $(".hd").children("ul").children().each(function(){ $(this).click(function(){ alert('Handler for .click() called');
I have links in <ul> which I consider as tabs. What I'm trying to do is add a class to the currently selected <li> and simultaneously remove the classes from all the other <li> in the list. I think I could change it, i.e. The click handler should go first, and the bypass should go inward. My goal is this:
source share