jquery set href of link

JavaScript
$('.element').attr('href', newUrl);$("#mylink").attr("href");

Source

Also in JavaScript: