You can't trigger a link's default action with jQuery, but you can do something like this:

$().ready(function() {
      $('#thelink').bind('click', function() {
        window.location = this.href;
        return false;
      }).trigger('click');
});


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Sep 3, 2008, at 10:41 AM, byron wrote:


I created an email link, that I want invoked ("clicked") on page load.
I thought I could simply do:

$().ready(function() {
   $("#thelink").click()
})

Do I need to do something else?

Thanks.

Reply via email to