How would you trigger a click event from an element that supposedly does not have native clickable behaviours?
For example, I know that you could simply just use the
You will need to feature detect as different browsers (using non-html5 doctype) can support different dom methods:
var ele = document.getElementById('x'); if(typeof ele.click == 'function') { ele.click() } else if(typeof ele.onclick == 'function') { ele.onclick() }