I have a bunch of menu links and want to change their style on click - say you click "about" and it becomes bold and red. I select the items and bind click event to them:
$("#nav_menu > *").bind("click",function(){doTrigger(this.id);});
this way I pass the ID of the clicked item to doTrigger
.
Ok. Now in doTrigger
I am trying to iterate through the items and change their styles: all to style1 and clicked to style2 for example. The problem is that:
$("#nav_menu > *").each(function(){;});
will not let me pass the id of the clicked item.
I think there should be a less complicated way of getting what I need. Besides, I think I am lost, too.