I have added a simple enhancement to the prototype lib (v1.6.0) which
can be used to get the last childnode of element:

    lastDescendant: function(element) {
        var descs = $(element).descendants();
        var iterator = 1;
        element = descs[descs.length-iterator];
        while(element && element.nodeType != 1 && iterator <= descs.length) {
            element = descs[descs.length-iterator];
        return $(element);

With syntax highlighting it is available here: http://pastebin.com/f5918ff36

I hope some of you will find it useful. :)

Daniel Varga, Hungary

You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to