Is there a way to take the current target of an event with IE 7 or 8?
With other browser (firefox, opera, chrome etc.) we can use
event.currentTarget
or
well i m not sure but this may be a solution: since the child element given by srcElement is not supposed to have an event because this gonna make interference with the event on the parent element neither any other upper element before the top element where the event statement (like onmosedown="") so this is the code:
if (!event) event = window.event;
if (event.currentTarget) element = event.currentTarget;
else{element = event.srcElement; while(element.onmousedown==null) element = element.parentNode;}
if(element.nodeType==3) element=element.parentNode; // defeat Safari bug
this seems to work fine till now with me please correct me if u find a problem cz i need a solution for that i dont want to use jquery..