list.attr(name, val) should set attribute for each element in the list