开发者

handling mouseover/mouseout events for dijit.TitlePane's titleNode

开发者 https://www.devze.com 2022-12-13 23:32 出处:网络
I have a lot of dijit.TitlePanes 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

I have a lot of dijit.TitlePanes 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消