Is it possible to get an array consisting of all id\'s on a page with jQuery?
var ids = $('*[id]').map(function() { return this.id; }).get();
The .map() method is particularly useful for getting or setting the value of a collection of elements.
http://api.jquery.com/map/