Reputation: 203
How can I show the popup on page load using href? what I did is to show the popup using href
<a class="btn btn-primary skip popop-btn" href="#popup1">OPEN POPUP</a>
if I clicked this link it will show my popup. What I want is to automatically show popup on page load without clicking it?
This is my code for simple jquery.
$(document).ready(function(){
setTimeout(function(){
//My function for showing the popup
},3000);
});
Upvotes: 0
Views: 58
Reputation: 21
step1: set id for the a tag step2: trigger the click event
$(document).ready(function(){
setTimeout(function(){
$("#linkId").trigger("click");
},3000);
});
Upvotes: 1