adspace


Difference Between Prop and Attr in jQuery?

Answer Posted / Sulabh Dhawan

Prop refers to properties of HTML elements, which are accessed using camelCase syntax (e.g., $(selector)[propertyName]). On the other hand, Attr refers to attributes of HTML elements, which are accessed using attribute names with hyphens (e.g., $(selector).attr('attribute-name')).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you install/use jquery in a project. What is the minimum setup needed to start using jquery.

999


How can jquery library be added to pages?

952


What is the minimum setup needed to start using jquery.

939


How to validate email using jquery?

974


Do you have plans for a new jquery plug-in or something else we should look out for? Where to from here for the imgpreview plugin?

864


How to always reference latest version of jquery?

875