fix calling remove and add class on non jquery elements
ticket 6903
merge in feedhenry3