Checking whther the dynamic adding of class to the div element works