I often use the following utility function:

    function connectEach(iterable, signal, dest, func){
        forEach(iterable, function(el){
                connect(el, signal, dest, func);
            });
    }

It might be used as follows:

    connectEach($$('#my-ul li'), 'onclick', function(e){
                // do sumn'
         });

rather than slightly more unwieldy:
    forEach($$('#my-ul li'), function(el){
            connect(el, 'onclick', function(e){
                    // do sumn'
                });
         });

Is it a good candidate to include in the Signal api?

Eoghan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to 
mochikit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to