I have model where i have two links click and click1 the pop is behind click and i want to trigger the popup when user clicks on click1 how can i do that . The anchor tags are here.
<a href="#modal">Click</a>
<a href="#modal1">Click1</a>
And the script i have written for it.
<script type="text/javascript">
$("#model1").click(function(){
$("#model").trigger("click");
});
</script>
Ok its so simple assign an id to second link like that.
<a href="#modal">Click</a>
<a href="#" id=modal1>Click1</a>
and write the javascript for it.
<script type="text/javascript">
$("#modal2").on("click", function(e) {
location.href = "#modal";
e.preventDefault();
});
</script>
Because as far as I am seeing that the popup is loading after first link href so why we don't redirect this second click to this first link href where the popup resides and I hope it will work.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments