I thought jQuery's click() can let us add a handler or just click on an element?
However, I tried:
$(function() {
setTimeout(function() {
$('a').first().trigger('click'); // or click(), the same
}, 3000);
});
and waited 3 seconds and it won't click on the first element in the page... how come?
Update: this is related to http://stackoverflow.com/questions/3130471/what-is-the-best-way-to-make-the-yahoo-media-player-autostart-jquery and so there should already be event handler for clicking on a media, so how come .click(), which is the same as trigger('click'), not firing off that event handler?