Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

trigger button click on page load using jquery

I have this html fiddle.

http://jsfiddle.net/yjL9128s/

On page load I want to use jquery to trigger the button click event.

On my page load I have it set like this. But its not working.
$('#ButtonBing').click();

Anyonw Know what I'm doing wrong?
Avatar of Member_2_1001466
Member_2_1001466

At least you first trigger the click and only later define the click handler. The trigger needs to be done, after the event handler is registered. So it might even be later, than just changing the order.
ASKER CERTIFIED SOLUTION
Avatar of bissellGR
bissellGR

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial