use classlist to detect if element has class