添加许多选项卡后,插件崩溃。我正在使用一些插件来增强我的应用程序面板内的表格。我不知道为什么,但是当我将第三个选项卡添加到第二页时,插件不会激活最后添加的选项卡,这会使表插件崩溃。
这是我的一些代码:
int port = 18000;
DatagramSocket serverSocket = new DatagramSocket(port);
byte[] receiveData = new byte[8];
System.out.println("Server Listing on Port: "+port);
String x;
while (true)
{
DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
serverSocket.receive(receivePacket);
function addSearchResult(title, content) {
id = "tabs-" + tabId.toUpperCase(),
li="<li><a href='#"+id+"'>"+title.toUpperCase()+"</a><span class='ui-icon ui-icon-close'></span></li>";
tabs.find( ".ui-tabs-nav" ).append( li );
tabs.append( "<div id='" + id + "'>" + content + "</div>" );
tabs.tabs( "refresh" );
$('#modal').trigger('close');
tabs.tabs('option','active', $('#'+id).index()-1);
indexTab++;
$(".activo").find('.tablaQuotes, .tablaCuatro, .tablaCinco, .tablaSeis').dataTable({
"aaSorting": [[1,'desc']]
});
$(".activo").find('.other').find('.tabui').dataTable({
"aaSorting": [[2,'desc']],
"iDisplayLength": 5
});
$(".activo").find('.gal').carouFredSel({
circular:false,
infinite:false
});
$(".activo").find(".grupo").colorbox({
rel:'pt-'+tabId, transition:"none", width:"75%", height:"75%",
onComplete:function(){
$('#cboxLoadedContent').zoom();
}
});
}
这是标签的代码:
var tabs = $( "#tabs" ).tabs({
beforeActivate: function( event, ui ){
},
create: function( event, ui ){
},
activate: function( event, ui ){
$('div').removeClass('activo');
ui.newPanel.addClass('activo');
}
});
$( "#tabs" ).tabs('paging');