"trigger" fires inmediatly the event.
$('#clickme').click(function()....) binds an event to the element.

Both are different..
Just test it.. I must work.

Best regards

----- Original Message ----- From: "pedalpete" <p...@hearwhere.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Monday, July 13, 2009 9:55 AM
Subject: [jQuery] Re: trigger click on an anchor



jQuery doesn't care what you are linking to, as long as that file is
there, it will be retrieved (I can't think of any reason why not).'

you could use
$('#clickme').click(function()....
that would I believe be more efficient

On Jul 13, 8:45 am, sso <strongsilent...@gmail.com> wrote:
if I have a link on my page like this

<a id="clickme" href="home/download/myfile.pdf">triggerclick</a>

should I be able to click it with jquery?

on event {
$('#clickme').trigger('click');

}

or will it disallow it because its linking to a file

Reply via email to