Hi all,
I am trying to grab the ID of a DIV class referenced by its Class name using JQuery, but failed to do it.
$(".myClass").click(function(e){
alert($(this).id);
}
<DIV id="myTest1" class="myClass">
Helloworld I am new to JQuery 1
</DIV>
<DIV id="myTest2" class="myClass">
Helloworld I am new to JQuery 2
</DIV>
Could you help me please?