var cats = $("span#cats").text() ;
var cats = [];
$('.cats').each(function() {
cats.push($(this).text());
});
var catsNodes = document.getElementsByClassName('cats');
var cats = new Array(catsNodes.length);
for(var i = catsNodes.length; i--;) {
cats[i] = catsNodes[i].innerText;
}