attr() gets/sets the HTML attribute using the DOM functions
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:
$('#tosAccept').prop('checked', true); // using attr() won't work properly here