In jQuery 1.6+ it's better to use:
$(selector).prop('href',"http://www...")
to set the value, and
$(selector).prop('href')
to get the value
In short, .prop
gets and sets values on the DOM object, and .attr
gets and sets values in the HTML. This makes .prop
a little faster and possibly more reliable in some contexts.