JSFiddle - React, Tailwind, and code Playground

by Deividas Krupstas

HTML

<div id="box" class="test in-anwserbox">
 click   
</div>

JavaScript

$('#box').on('click',function() {
    if(!$(this).is('[class*="answerbox"]')) {
        alert('ok');  
    } else {
        alert('has class');
    }
});