$(function(){
$('#tt').tabs({
border:true,
tools:[{
iconCls:'icon-add',
handler:function(){
$('#tt').tabs('add',{
title:'New Tab',
content:'Tab Body',
closable:true,
tools:[{
iconCls:'icon-mini-refresh',
handler:function(){
alert('refresh');
}
}]
});
}
},{
iconCls:'icon-save',
handler:function(){
var tab = $('#tt').tabs('getSelected');
var index = $('#tt').tabs('getTabIndex',tab);
tab.panel('refresh', 'index.html');
}
},{
iconCls:'icon-remove',
handler:function(){
var tab = $('#tt').tabs('getSelected');
var index = $('#tt').tabs('getTabIndex',tab);
$("#tt").tabs('close',index);
}
}]
});
});
$('#tt').tabs({
border:true,
tools:[{
iconCls:'icon-add',
handler:function(){
$('#tt').tabs('add',{
title:'New Tab',
content:'Tab Body',
closable:true,
tools:[{
iconCls:'icon-mini-refresh',
handler:function(){
alert('refresh');
}
}]
});
}
},{
iconCls:'icon-save',
handler:function(){
var tab = $('#tt').tabs('getSelected');
var index = $('#tt').tabs('getTabIndex',tab);
tab.panel('refresh', 'index.html');
}
},{
iconCls:'icon-remove',
handler:function(){
var tab = $('#tt').tabs('getSelected');
var index = $('#tt').tabs('getTabIndex',tab);
$("#tt").tabs('close',index);
}
}]
});
});