Javascript event detection
- by Ben Shelock
I can't find any good documentation on this suprisingly so I'm posting it here.
What's the raw javascript equivilent to this:
$(elem).click(function(){
alert(this.text());
});
All I can find is this <elem onlick="func()" /> which is not what I want, I want to be able to do it just with javascript not within the context of an element.