add jquery in anchor tag code example Example: jquery set href of link $('.element').attr('href', newUrl);