If I have a element with multiple values inside a data-attr, how can I add those individually to a array?
<button id="test" data-values="1 13513 51681">TEST</button>
… and this:
$('#test').on('click',function(){
myArr.push($(this).data('values'));
console.log(myArr)
});
… gives me: ["1 13513 51681"].
But I need: ["1","13513","51681"]