How easy is it to make AccordionContainer provided with Dojotoolkit to slide up and down On MouseHover of Title rather than onMouseClick of the title pane.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This is fairly straightforward, but involves connecting to the semi-private _buttonWidget property for each child pane, so I can't guarantee that future versions of the toolkit won't break it. That said, I've tested in with the version of Dojo 1.3 on AOL's CDN.
Basically, after you've called startup() on your AccordionContainer, you just iterate through its children and connect each child's _buttonWidget to an anonymous onMouseOver event handler:
aContainer.getChildren().forEach(function(child){ dojo.connect(child._buttonWidget, "onMouseOver", function(){ aContainer.selectChild(child); }); });
Full example is here