jQuery.attr()
Gets the value of an attribute for the first element in the set of matched elements.
Whereas:
jQuery. Prop ()
Gets the value of a property for the first element in the set of matched elements.
Please refer this following link for more detail: Difference Between Prop and Attr