Dijit TabContainer活动 - onFocus [英] Dijit TabContainer Events - onFocus
本文介绍了Dijit TabContainer活动 - onFocus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Tab容器,当我点击标签的标题栏时,我想执行一些js。
I have a Tab Container and I want to execute some js when I click on a tab's title bar.
我似乎无法弄清楚如何添加一个事件。
I can't seem to figure out how to add an event to that.
编辑:
就像我将使用 onFocus ,但我仍然有麻烦找到正确的语法。
It looks like I'll be using onFocus, but I'm still having trouble finding the proper syntax.
Found onFocus and onBlur, but still having trouble getting it to work.
推荐答案
>您需要连接到_transition事件。
You need to connect to the _transition event.
var tabs = dijit.byId("tabs");
dojo.connect(tabs,"_transition", function(newPage, oldPage){
console.log("I was showing: ", oldPage || "nothing");
console.log("I am now showing: ", newPage);
});
Tab是您的TabContainer。
Where "tabs" is your TabContainer.
这篇关于Dijit TabContainer活动 - onFocus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文