I\'ve got a couple of divs to scroll between. I need to set the one in active view (after a link was clicked) to \'active\' and all the other div\'s should have that class r
why not just use addClass and removeClass:
$(".selected").removeClass("selected"); $(this).addClass("selected");
to only remove selected from divs use this for the first line:
selected
$("div.selected").removeClass("selected");