I have the following code:
<div class="topLevel">
<span class="misc pointDown"></span>
<span class="misc"></span>
<span class="b">item</span>
</div>
When I click on the topLevel I need to replace “pointDown” with “pointUp”. I think I have difficulty targeting the right element.
$(".topLevel").live('click', function() {
$(this).next("span").removeClass("pointDown").addClass("pointUp");
});
try this: