I have this:
$(".section").each( function() {
var x = $(this).attr('data-test');
var y =[];
y.push(x);
});
I will get 10 values for data-test, and I want to push them to the array 'y' to be like this:
['1','2','3','4','5','6'...'10']
How do I "split up" x into each of its values and push them to y?
EDIT:
HTML e.g:
<li class="section" data-test="15"></li>
<li class="section" data-test="6"></li>
<li class="section" data-test="78"></li>
and so on