I’m trying to get all the text of a particular class into an array.
The below works theoretically, but it puts them into an object, not an array, and .map apparently is widely unsupported in most versions of IE 🙁
var valuesArr = $('.'+sort_column);
var valuesArr = valuesArr.map(function(){return $(this).text().trim();});
Is there any way to get all the values into a plain and simple array that I’m just missing?
Thanks!
Simple iteration:
Or with jQuery
mapmethod:DEMO: http://jsfiddle.net/f6cmR/