I’m using a function to add an onClick event to a <div>, like:
onClick='function(param)
How can I check now if this event is set at all? div.onClick doesn’t do it’s job.
EDIT: I tried now this:
if (typeof div.onClick === 'function')
…and this:
if (!typeof div.onClick === 'function')
and both cases are false.
Also, make sure your script is placed at the bottom of the page. You can’t select elements otherwise.