i wrote a helper method to help me go through all my selected elements and remove the active class.
function removeClassFromElem(classSelect, classToRemove){
$(classSelect).each(function(){
var currElem=$(this);
if(currElem.hasClass(classToRemove)){
currElem.removeClass(classToRemove);
}
});
}
//usage
removeClassFromElem('.someclass', 'active');