How do you do jQuery’s hasClass with plain ol’ JavaScript? For example,

<body class="foo thatClass bar">

What’s the JavaScript way to ask if <body> has thatClass?

14 Answers
14

Leave a Reply

Your email address will not be published. Required fields are marked *