Naveen Yogi, Naveen Web Design, Web Designing

html,css,html5,css3,javascript,jquery blog there is queries with solution regarding the web designing

Pages

  • Home
  • HTML & CSS
  • jQuery

Saturday, 12 August 2017

How to open link of anchor tag on click of another div

<div class="nv"> click here </div>
 <a class="info_link" href="https://www.google.co.in/?gws_rd=ssl"> demo link</a>


<script>
      $(document).ready(function(){
    $(".nv").click(function() {
    var link = $(this).siblings("a").attr('href');
    window.location.href=link;
});
});
</script>
Posted by naveenwebdesign at 02:07 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

naveenwebdesign
View my complete profile

Blog Archive

  • ►  2023 (1)
    • ►  February (1)
  • ►  2022 (1)
    • ►  April (1)
  • ►  2019 (6)
    • ►  November (1)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (2)
  • ►  2018 (7)
    • ►  April (4)
    • ►  March (2)
    • ►  January (1)
  • ▼  2017 (16)
    • ►  September (1)
    • ▼  August (1)
      • How to open link of anchor tag on click of another...
    • ►  July (2)
    • ►  June (2)
    • ►  May (1)
    • ►  April (5)
    • ►  March (1)
    • ►  February (3)
  • ►  2016 (13)
    • ►  July (9)
    • ►  June (2)
    • ►  May (2)
Simple theme. Powered by Blogger.