How to make onclick automatically through onload function

html, javascript, jquery, onclick

Solution

$(document).ready(function() {
   $('#someLinkId').click();
});

Or

$(document).ready(function() {
   $('#someLinkId').trigger("click");
});

Problem

I have a `href` link and I would like it to be clicked when the page is loaded.

Original source