change method attr() to prop()

according to http://api.jquery.com/attr/

For example, selectedIndex, tagName, nodeName, nodeType, ownerDocument,
defaultChecked, and defaultSelected should be retrieved and set with the
.prop() method. Prior to jQuery 1.6, these properties were retrievable
with the .attr() method, but this was not within the scope of attr.
These do not have corresponding attributes and are only properties.