I have the class below. Trying to do a simple rollover class.

var Rollover = Class.create();

Rollover.prototype = {
        initialize: function(className) {
                $$(className).each(function(x) {
                        x.mouseover = this.doHover.bindAsEventListener(this);
                });
        },
        doHover: function(e) {
                alert("over");
        }
};

It errors on the line (x.mouseover =
this.doHover.bindAsEventListener(this);)  with the following message:
this.doHover has no properties

Any ideas why? I've used the bindAseventListener before, and haven't
seen this error. Its probably something painfully obvious that I'm
missing or forgetting...

Thanks

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to