Unable to capture the id of div clicked
Posted
by
user3674364
on Stack Overflow
See other posts from Stack Overflow
or by user3674364
Published on 2014-05-27T09:14:29Z
Indexed on
2014/05/27
9:25 UTC
Read the original article
Hit count: 154
jQuery
This is my jsfiddle
How can i register for the event div click , so that i can get the name
i have tried with different things , but none of them worked .
$('#tabs div').click(function() {
var elem = $(this);
alert(elem);
});
$('#tabs').on('click', 'div.click', function () {
var elem = $(this);
alert(elem);
});
$("#tabs").click(function(){
var elem = $(this);
alert(elem);
});
© Stack Overflow or respective owner