How to Check Whether an Element Has a Class in JavaScript | CodeTrail