Replacing .attr() function with .prop() for forward compatibility.