I have a JS function that I want to automatic click in a jquery.click link when page loads.
How can I make it work?
When page loads I want to see the alert, no click in the link needed.
js:
window.onload = function(){
document.getElementsByClassName("c").click();
}
$(".c").click(function(){
alert("ok");
});
html:
<a href="#" class="c">test</a>
clickevent before use oftrigger