Sorry if my question in doesn't good place.

I try too add event to collection of input, this code work perfectly
for one

        var dialog_msg = function(){ alert('Foo'); }
        $('answer_submit_id').addEvent('click', dialog_msg);

but when i try this, doen't work :-(

        $$('answer_submit_class').addEvent('click', dialog_msg);

or this

        $$('answer_submit_class').each(function(stuffButton) {
            stuffButton.addEvent('click',function(){
                alert('Yep');
            });
        });

or this

        var myFx = new Fx.Elements($$('input.answer_submit_class')).set({
                 'click': function(){
                        alert('click');
                    }
        });

and many other ...

in other word, i can't do apply an event to collection of element. and
i nothing find in doc http://mootools.net/docs/

Anybody for help me ?!
Thanks.



Reply via email to