Hopefully someone can explain some odd behavior I\'ve encountered with jQuery. The following script is looking for relative links on my page and replacing them with absolut
.prop() grabs the property value as opposed to the attribute value. While similar, there are some subtle, important differences -- one of which applies here. The href property on an element is always the full path. For example:
In other words, you're appending the domain to a value that is already an absolute path. Just use .attr() rather than .prop() and you'll be fine.
To see an example, open your console and go to this page: http://jsfiddle.net/JUcHU/