I have search jquery docs and SO but I can't find exactly what I am after.
I have spans created in php so they follow the pattern of:
<span class="om" id="o_1"></span>
<span class="om" id="o_3"></span>
...
I want to collect all the numbers in the id attribute and send them as an array of data (json if needs be) to the server via ajax and return the result to a function:
$.get("/pages/gOboxMeters", function($("span.om") <-- extract id's here ) {alert(data);} )
I am just alerting it for now.
What is the right code?
Thanks