[ad_1]
To be more precise and make it work only for a particular anchor element
$("body").ready(function() {
$("ul >li >a:contains("google").attr("href", "http://www.stackoverflow.com/")
})
[ad_2]
solved How to change the href through javascript or jquery? [duplicate]