how to trigger an anchor tag resides on the page by clicking on another anchor tag

Vicky

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>
Aitazaz Khan

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how to trigger an anchor tag resides on the page by clicking on another anchor tag

From Dev

How to trigger onclick event on an anchor tag after page load in javascript

From Dev

anchor tag to send post data to another page

From Dev

Anchor Tag to Middle Of Page

From Dev

Navigation Scrolling and Clicking anchor tag

From Dev

Clicking on Anchor Tag with Button Role

From Dev

How to avoid page refreshing on anchor (<a></a>) tag click?

From Dev

How to avoid page refreshing on anchor (<a></a>) tag click?

From Dev

jQuery Mobile does not move to the next page after clicking on anchor tag

From Dev

DIsplaying the contents on clicking the anchor tag within the same page

From Dev

How to create anchor tag

From Dev

Can I make an anchor tag overlay another anchor tag?

From Dev

Link to Anchor Tag on Another Page Doesn't Work

From Dev

link a div in another page in url with an anchor tag Django

From Dev

link a div in another page in url with an anchor tag Django

From Dev

Is clicking link on an anchor tag a cross origin request?

From Dev

Display a form when clicking on an anchor tag

From Dev

How to trigger mdmenu on click of span or anchor tag in angular2

From Dev

How to disable html anchor tag of master page in other page?

From Dev

how to disable anchor tag in jquery?

From Dev

How to check if a string is an anchor tag?

From Dev

How to replicate an anchor tag in Excel

From Dev

How to use an anchor tag with jQuery

From Dev

How to check if a string is an anchor tag?

From Dev

How to pass variable in anchor tag

From Dev

how to redirect to anchor tag in view page after CodeIgniter validation

From Dev

How can I use an anchor tag to open a modal page?

From Dev

How to make anchor tag fit to content? not entire width of page

From Dev

How to prevent scrolling of page while using Show and Hide anchor tag?

Related Related

  1. 1

    how to trigger an anchor tag resides on the page by clicking on another anchor tag

  2. 2

    How to trigger onclick event on an anchor tag after page load in javascript

  3. 3

    anchor tag to send post data to another page

  4. 4

    Anchor Tag to Middle Of Page

  5. 5

    Navigation Scrolling and Clicking anchor tag

  6. 6

    Clicking on Anchor Tag with Button Role

  7. 7

    How to avoid page refreshing on anchor (<a></a>) tag click?

  8. 8

    How to avoid page refreshing on anchor (<a></a>) tag click?

  9. 9

    jQuery Mobile does not move to the next page after clicking on anchor tag

  10. 10

    DIsplaying the contents on clicking the anchor tag within the same page

  11. 11

    How to create anchor tag

  12. 12

    Can I make an anchor tag overlay another anchor tag?

  13. 13

    Link to Anchor Tag on Another Page Doesn't Work

  14. 14

    link a div in another page in url with an anchor tag Django

  15. 15

    link a div in another page in url with an anchor tag Django

  16. 16

    Is clicking link on an anchor tag a cross origin request?

  17. 17

    Display a form when clicking on an anchor tag

  18. 18

    How to trigger mdmenu on click of span or anchor tag in angular2

  19. 19

    How to disable html anchor tag of master page in other page?

  20. 20

    how to disable anchor tag in jquery?

  21. 21

    How to check if a string is an anchor tag?

  22. 22

    How to replicate an anchor tag in Excel

  23. 23

    How to use an anchor tag with jQuery

  24. 24

    How to check if a string is an anchor tag?

  25. 25

    How to pass variable in anchor tag

  26. 26

    how to redirect to anchor tag in view page after CodeIgniter validation

  27. 27

    How can I use an anchor tag to open a modal page?

  28. 28

    How to make anchor tag fit to content? not entire width of page

  29. 29

    How to prevent scrolling of page while using Show and Hide anchor tag?

HotTag

Archive