Dojo dijit.layout.TabContainer-如何向选项卡添加类? [英] Dojo dijit.layout.TabContainer - how to add class to tab?

查看:132
本文介绍了Dojo dijit.layout.TabContainer-如何向选项卡添加类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在TabContainer的选项卡中添加类?

Ho to add class to the tab in TabContainer?

我唯一发现的是设置了iconClass。但是我需要在选项卡中将类添加到父div。

Only thing I've found is set iconClass. However I need to add class to the parent div in tab. Not to some nested divs inside it.

推荐答案

不是一个简单的方法,但是我可以访问tabcontainer对象中的tab按钮。

Not a simple way, but I got access to the tab button in the tabcontainer object.

var tabContainer = ...; 
dojo.addClass(tabContainer.tablist.pane2button["123"].domNode, "myTabClass");

http://jsfiddle.net/cswing/N2hsG/

这篇关于Dojo dijit.layout.TabContainer-如何向选项卡添加类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆