add addClass support and testcases.