Hi, > does jQuery have a method to transform its results to an array of DOM > nodes? Like for example: > > var lis = $('li').toArray();
Of course you could do it like this: jQuery.prototype.toArray = function() { var rval = []; this.each(function(){rval.push(this)}); return rval; } I'm not shure if that works, but you can also try: jQuery.prototype.toArray = function() { return [].concat(this); } If it does work, that method should be faster. Christof _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/