I have a link with an inline onclick event:
<a href="#" onclick="somefunction();">click</a>
I registered an additional function on the onclick event:
jQuery("#addMoreOptions").live('click',function(){
console.log('clicked');
});
Which works fine when I click on the link on the browser, but not when I simulate programmatically:
jQuery("#addMoreOptions").click();
The programatical version triggers the inline event but not the "live" one.
When you have multiple functions attached to an event, what order does it use?
.liveis making me think that when you issue the.click()the element doesnt exist yet.