I use a custom attribute in elements with my own class. I\'m trying to return the value of custom attribute for all elements of the class.
I used jQuery to find th
Simple solution (ES6)
Array.from(document.getElementsByClassName('tab_item')).map(item => item.getAttribute('foo'));
Online demo (jsFiddle)