Hi, I have a class 'Menu' with a method 'addItem'. The method (simplified) looks like this:
addItem: function(itemId, text) { this.container.innerHTML += '<div id="'+itemId+'">'+text+'</div>'; Event.observe(itemId, 'mouseover', this.onMouseOverHandler.bindAsEventListener(this), false); } I call my class in the following way: var myMenu = new Menu(); myMenu.addItem('item1', 'Item 1'); myMenu.addItem('item2', 'Item 2'); myMenu.addItem('item3', 'Item 3'); And here comes the mystery: only the last item (item3) triggers the 'onMouseOverHandler' listener. When I remove item3, than it's trigged by item2 and so on... Anyone have a solution? Thank you in advance! Thomas -- Posted with http://DevLists.com. Sign up and save your mailbox. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs