$('.element').attr('href', newUrl);
$("#someAnchorElement").attr("href", "http://www.myfancynewurl.com");