Difference between ‘prop’ and ‘attr’ in JQuery?
2865
03-Mar-2017
Hemant Patel
03-Mar-2017Major difference between ‘prop’ and ‘attr’ , we can get value of custom attributes by using attribute (attr) but we can’t get value of custom attribute by using ‘prop’.
We only get pre-defined attributes value by ‘prop’ but we can’t able to get value of custom attribute by using ‘prop’.
Example of 'prop':
Example of 'attr':