Showing posts with label Change link href via jQuery. Show all posts
Showing posts with label Change link href via jQuery. Show all posts

Sunday, 11 October 2015

How to change href attribute of a link using Jquery


How to change href attribute of a link using Jquery

<a id="bigImg" href="https://www.blogger.com/" class="w_img" >Chandresh rana</a>

<script type="text/javascript">
jQuery("#button").click(function(){
    jQuery("#bigImg").attr('href', 'http://chandreshrana.blogspot.com');
});
</script>