I propose hcae:

jQuery.fn.hcae = function( fn, args ) {
        return jQuery.hcae( this, fn, args );
};

jQuery.hcae = function( obj, fn, args ) {
        if ( obj.length == undefined )
                for ( var i in obj )
                        fn.apply( obj[i], args || [i, obj[i]] );
        else
                for ( var i = obj.length - 1; i >= 0; --i )
                        fn.apply( obj[i], args || [i, obj[i]] );
        return obj;
};

-blair ;)

kenton.simpson wrote:
> Is there a way to make .each walk backwards threw the element collection?

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to