jquery.easyui.min.js:4688 Uncaught TypeError: Cannot read property 'panel' of undefined
    at HTMLDivElement.<anonymous> (jquery.easyui.min.js:4688)
    at HTMLDivElement.dispatch (jquery-1.11.1.min.js:3)
    at HTMLDivElement.r.handle (jquery-1.11.1.min.js:3)
(anonymous) @ jquery.easyui.min.js:4688
dispatch @ jquery-1.11.1.min.js:3
r.handle @ jquery-1.11.1.min.js:3在代码中添加全关闭按钮时就报上面的错了,怎么解决.求大神指点
if (!$('#tabs').tabs('exists', subtitle) ) {
                $('#tabs').tabs('add', {
                    title: subtitle,//标题
                    content: createFrame(url),
                    fit:true,
                    closable: true
                });
               var li = $(".tabs-wrap ul li:last-child");  
                $("#close").remove();  
                li.after("<li id='close'><a class='tabs-inner' href='#' onClick='javascript:closeAll()' style='height: 27px; line-height: 33px;''><span>关闭全部</span></a></li>");
关闭函数:
//关闭全部tabs
function closeAll() {
            $(".tabs li").each(function(index, obj) {
                //获取所有可关闭的选项卡
                var tab = $(".tabs-closable", this).text();
                $(".easyui-tabs").tabs('close', tab);
            });
            $("#close").remove();//同时把此按钮关闭
        }