Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Actually click() does fire a click event just like trigger. It only register an event handler if you pass it an argument. Check out the jquery docs: docs.jquery.com/Events/click Commented Oct 15, 2009 at 18:19
  • I read the docs.jquery.com page you referred to, but there was no example of how the cick event was used. Commented Oct 15, 2009 at 18:33
  • Thanks ceejayoz, but this still isn't working. jQuery(function($) { $('a').trigger('click'); }); Commented Oct 15, 2009 at 18:37
  • Its the first listing, the one without any parameters. Commented Oct 15, 2009 at 18:42
  • @psenn Sounds like you're running into a popup blocker or something, then. The only other thing I can suggest right now is to give the link an ID and access it that way. Commented Oct 15, 2009 at 19:15