I saw a comment saying
It’d be better to set the “title” property with
.prop()instead of.attr()if you’re using at least version 1.6 of jQuery.
Can someone explain why this is?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I guess you’re familiar with the differences between
propandattr.As the
titleattribute is reflected by thetitleproperty, there is actually no difference.