This works for the first match:
var attributeValue = $({selector}).data("myAttribute");
But if I want to get values for all elements selector matches, I do the following:
var attributes = [];
$.each($({selector})), function(k,v) { attributes.push($(v).data("myAttribute")); });
This feels stupid. Is there simpler way to get the data for all the elements?