how to give reference to an element to href in jquery code example Example: jquery set href of link $('.element').attr('href', newUrl);