I have 3 button elements on which I have assigned the same type of JSON objects to a data attribute. I imagined that I would be able to get those objects into an array, but I only get a single object from the first match.
Here is my jQuery:
var configs = $("button[id*='alertbtn']").data('config');
I have verified that my selector
$("button[id*='alertbtn']")
targets the correct three elements.
Is it possible to achive what I want using a single line of code?