All I am trying to accomplish is to be able to have an unordered list of links in which one is clicked, the parent list item is assigned the class \"active.\" Once another l
Something like the following ought to do it
$(function() { $('li a').click(function(e) { e.preventDefault(); var $this = $(this); $this.closest('ul').children('li').removeClass('active'); $this.parent().addClass('active'); }); });
Working Demo