support .attr(attributeName, function(index, attr))