handling mouseover/mouseout events for dijit.TitlePane's titleNode
I have a lot of dijit.TitlePane
s stacked up one after another. I wish to handle the onmouseover and onmouseout events for the tile part o开发者_如何学Cf the TitlePane. What is the correct way of doing this?
Will something like :
dojo.connect(titlePane.titleNode, 'onmouseover', function f() {});
work, where titlePane is a reference to some dijit.TitlePane object?
Is there some declarative way of setting up such an event handler using "dojo/method"?
The only way that I know of connecting events in Dojo is through explicit calls to dojo.connect
. In other words, I don't believe that you can pass in event handlers as part of the title pane's constructor. My question to you is, does what you have work?
Looks like it should work, except connect to titleBarNode.
Also, onmouseenter is better than onmouseover.
精彩评论