The gist is that .attr(...)
is only getting the objects value at the start (when the html is created). val()
is getting the object's property value which can change many times.
The gist is that .attr(...)
is only getting the objects value at the start (when the html is created). val()
is getting the object's property value which can change many times.