jQuery link click
Par PlaceOweb le mardi, avril 12 2016, 20:34 - Javascript - Lien permanent
You can't trigger click on a href link with .click(). It only call handler associate (if one), but not simulate mouse click user.
<a href="index.php?param=value" id="myLink">text link</a>
$("#myLink").click(); // doesn't work // for use href location of link, use : window.location.href = $("#myLink").attr("href"); // and for both : handler defined + href $("#myLink").click(); window.location.href = $("#myLink").attr("href"); // or if ($("#myLink").click) $("#myLink").click(); else window.location = $("#myLink").attr('href');