i have a DOM element with class=\'tag\'.
i want to check if the class value is tag and alert a message if it\'s true.
i wrote:
$(\"#thread\")
Here you go.
$("div").each(function (index, domEle) { if (domEle.hasClass("tag")) { console.log('yes'); } else { console.log('no'); } });