Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 动态表格文本搜索_Jquery_Html - Fatal编程技术网

Jquery 动态表格文本搜索

Jquery 动态表格文本搜索,jquery,html,Jquery,Html,我试图根据搜索框动态筛选表单元格内容 我有一个表,它有几个[3个单元格]行。每个单元格都是独立的,每个单元格中都有一个用户名 我希望所有单元格都消失,但与搜索条件匹配的单元格除外 我已经看了这里,但没有运气(它使整行消失,而不是单个单元格): 感谢您的帮助!谢谢如果您在您提到的网站上获取了代码,该怎么办: //hide all the rows $("#fbody").find("tr").hide(); //split the current value of searchInput var

我试图根据搜索框动态筛选表单元格内容

我有一个表,它有几个[3个单元格]行。每个单元格都是独立的,每个单元格中都有一个用户名

我希望所有单元格都消失,但与搜索条件匹配的单元格除外

我已经看了这里,但没有运气(它使整行消失,而不是单个单元格):


感谢您的帮助!谢谢

如果您在您提到的网站上获取了代码,该怎么办:

//hide all the rows
$("#fbody").find("tr").hide();
//split the current value of searchInput
var data = this.value.split(" ");
//create a jquery object of the rows
var jo = $("#fbody").find("tr");


这将隐藏TDs而不是TRs。但是它可能会让格式变得很奇怪,我会先测试一下。

谢谢你的回答,这正是我3分钟前做的!问题是,我需要一种方法来重新排列结果单元格(在表中向上移动它们,因为当前它们不移动,结果表中有洞!)好了,现在它可以工作了。。我只是有多个相同值的复选框,这当然会导致错误!谢谢
//hide all the rows
$("#fbody").find("td").hide();
//split the current value of searchInput
var data = this.value.split(" ");
//create a jquery object of the rows
var jo = $("#fbody").find("td");