assign class right after appending element