Live a Reply

JS function detect which div is being clicked

Useful when debuging on mobile where you can’t open tag inspector.

jQuery( document ).ready(function() { 
  jQuery("div").click(function() { 
    var myClass = jQuery(this).attr("class"); 
    alert(myClass); 
  }); 
});

 

Illustration by tamypu