Check if element has certain Class - jQuery

Click on the Check class button.

div1
div2
div3


  

Result