Does anyone know a good way to cache a collection of objects returned by a selector.
var $platforms = $(".platforms");
var i = 0, l = $platforms.length, current;
for(;i<l;i++) {
current = $($platforms[i]); //calling jQuery() in a loop. Should be cached
}
The above code creates a jQuery instance of each element returned by $(".platform")
when it should be cached. Is there any easy way to do this?