jQuery .prop(“href”) vs .attr(“href”)

jQuery .prop(“href”) is not equal to jQuery .attr(“href”)

The difference between prop and attr is that attr grabs the HTML attribute where as prop grabs the DOM property.

Example:

Be careful in your decision to use attr for referencing an href. 99% of the time, you probably want to use prop.