I need some help understanding how jQuery stores elements. Please have a look at this link:
http://jsfiddle.net/NubWC/
I am trying to get the element id from all the heading tags that have a specific class and put that into an array so I can do something with it. In the link you will see I tried to do that and alert out but it only alerts the first ID returned and not all of them. How do I go about something like this?
Thanks in advance.
I tried this and it worked:
You need to explicitly make the array, and use the
.eachjQuery function to loop through all the elements that match your selector.