easyui-tabs 页签绑定click事件

<div class="easyui-tabs" id="tabs" style="width: 100%; height: 10px;">
<div title="资产负债表" style="padding: 10px">
内容1
</div>
<div title="收支利润表" style="padding: 10px">
内容2

</div>
</div>

 

var tabs = $("#tabs").tabs().tabs('tabs');
var title = "";
for (var i = 0; i < tabs.length; i++) {
tabs[i].panel('options').tab.unbind().bind('click', { index: i }, function (e) {
title = ($(this).find(".tabs-title").html());
});

}

 

posted @ 2016-01-05 09:39  Goosander  阅读(4131)  评论(0编辑  收藏  举报