我使用的是桌面jquery插件,我遇到了一点麻烦。jQuery TableSort插件
我有一个表有10列,我有一个过滤器,如果我解开一个盒子,使用CSS display:none
从表中删除相关的列。
这一切工作正常,但是当我然后使用分页时,这些细节然后显示。
看来,表分拣机插件relaods表数据并显示所有行,即使它们被设置为display:none
是否存在,如果这些列未显示/隐藏的方式,那么当寻呼触发这些不显示?
感谢
编辑:
$("#searchContainer #toggleOptions ul li a").on(
{click: function()
{
//detect classes
var currentButtonCnt = $(this).parent().attr("class");
var currentState = $(this).attr("class");
//remove _btn
currentButton = "."+currentButtonCnt.substr(0, currentButtonCnt.length-4);
var ids = [];
//toggle
if(currentState == "ticked"){
$(currentButton).hide();
$(this).removeClass('ticked')
}else{
$(currentButton).show();
$(this).addClass('ticked')
}
}
}//end click
)
我已经修改我的问题与执行删除列的代码。我不知道如何将代码添加到下一个/上一个按钮 –
已更新的答案。 – projeqht
嗨。感谢那。我现在遇到的问题是,在控制台中出现以下错误:'TypeError:currentButtonCnt is undefined' –