Posted over 8 years ago. Visible to the public.

Trigger a link's click action with Javascript

Use the click method on the DOM element:

Copy
let link = document.querySelector('a') link.click()

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Avatar
Henning Koch
Last edit:
11 days ago
by Henning Koch
Keywords:
jquery
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more