.attr() | jQuery API Documentation
jQuery: The Write Less, Do More, JavaScript Library ... The .attr() method gets the attribute value for only the first element in the matched set. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() m...