Hii,
I have an issue of using event.srcElement that i have write an event handler for a class selector but when i am taking the source element the exact element which i have clicked is not getting.Is there any alternative there
Hii,
I have an issue of using event.srcElement that i have write an event handler for a class selector but when i am taking the source element the exact element which i have clicked is not getting.Is there any alternative there
Try:
var target = e.target || e.srcElement;
but when i am taking the source element the exact element which i have clicked is not getting.Is there any alternative there
You mean this:
$('#element_id').click(function(){
$(this).... // it refers to current element
});
If you want to get element in to be used in plain javascript, you can do like:
$('#element_id').get(0);