pex
3 May 2007, 5:37 AM
I want to display extra info when you select or hover over a list *item* in the comboBox.
The way my code works now, it listens to the mouseover on the innerList, however this causes problems when you want to use 'mouseout' (to hide the info), moreover it doesn't work when you use keyboard navigation. (to browse through the list of items)
this.innerList.on("mouseover", this.showDetails, this);
this.innerList.on("mouseout", function(){console.log('moving mouse out of list')});
The mouseout keeps getting triggered when you mouse over the innerList items, because the listener is attached to the complete innerList.
What would be a good approach; To attach the handler to every single innerList item or to use some other technique?
The way my code works now, it listens to the mouseover on the innerList, however this causes problems when you want to use 'mouseout' (to hide the info), moreover it doesn't work when you use keyboard navigation. (to browse through the list of items)
this.innerList.on("mouseover", this.showDetails, this);
this.innerList.on("mouseout", function(){console.log('moving mouse out of list')});
The mouseout keeps getting triggered when you mouse over the innerList items, because the listener is attached to the complete innerList.
What would be a good approach; To attach the handler to every single innerList item or to use some other technique?