Now, I know that with methods like .css() you can pass it a single string to return the CSS property value on the matched elements like this:
var myColor = $("p").css("color");
And I know you can pass it an array of properties for it to create an object literal, like this:
var myProperties = $("p".css([ "color", "font-weight", "font-style" ]);
And that you can set properties by either a single property, or sending an object literal, ie:
$("p").css("color", "red");
$("p").css({ color: "red", fontWeight: "bold", fontStyle: "italic" });
But correct me if I’m wrong, I thought you could do all of the above with the .attr() method as well? Yet if I do:
var myAttribs = $("p").attr([ "id", "class", "style" ]);
Then jQuery throws an error. I’m using 1.10 right now. Am I just shrooming that I thought .attr() supported this?