使用easyui 循环添加tabs
for(var i=0;i<9;i++){
$("#tt").tabs('add',{
title:'aaa',
content:"bbbb",
closable:true,
});
}
只进行了一次添加,然后终止。经浏览器调试
在jquery.easyui.min.js 3648行中报了一个错
function _2b7(_2b8,_2b9){
var opts=$.data(_2b8,"tabs").options;
Uncaught TypeError: Cannot read property 'options' of undefined
var tabs=$.data(_2b8,"tabs").tabs;
if(_2b9.selected==undefined){
_2b9.selected=true;
}
Uncaught TypeError: Cannot read property 'options' of undefined
看看生产的代码 这个$("#tt").tabs重复了
同样遇到这个问题,你可能是id为tt的div没有class="easyui-tabs"这个属性值,楼主可以认真仔细检查一下
请问该怎么解决呢?我在用easyui时,这个问题出现了多次,都是div没有class="easyui-xxx"的属性值