ahref attr code example
Example 1: jQuery change href value
$("#someAnchorElement").attr("href", "http://www.myfancynewurl.com");
Example 2: href html
<a href="link">text</a>
$("#someAnchorElement").attr("href", "http://www.myfancynewurl.com");
<a href="link">text</a>