How to change the href value of a hyperlink in jQuery

How can we change the href for a hyperlink using jQuery?

Comments

  • DavidMDavidM USA
    edited January 2014

    $("a[href='http://www.google.com/']").attr('href', 'http://www.live.com/')

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion