Tutorial by Examples: differece

attr() gets/sets the HTML attribute using the DOM functions getAttribute() and setAttribute(). prop() works by setting the DOM property without changing the attribute. In many cases the two are interchangeable, but occasionally one is needed over the other. To set a checkbox as checked: $('#tosAcc...

Page 1 of 1