I am trying to loop through all of the links on a page and add them to an array using jquery but I can't seem to get it quite right.
What I have is:
$(document).ready(function() {
var links = new Array();
var link;
for (link in $("a"))
{
links.push(link);
}
alert(links);
});
What I get is an array of numbers (I think one for each link on the page), and properties, events, etc. like 'selector', 'context', ... 'onmouseover' and so on.
What am I missing?