根据复选框条件筛选div /表格行-Javascript / JQuery [英] Filter divs/table rows based on checkbox criteria -Javascript/JQuery

查看:152
本文介绍了根据复选框条件筛选div /表格行-Javascript / JQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅: mycellularcenter.com/phones



我想在javascript / JQuery中复制这个功能,但是对这个语言还不够熟悉,甚至不知道要找什么。

通过功能,我的意思是能力选择左列中的一个或多个项目,并将右列的内容显示/隐藏以符合所选的复选框标准。

我可以使行/ div显示/隐藏基于点击其他列中的文本,但不知道如何连接/迭代?通过多次选择。

建议/帮助表示赞赏。



JC

解决方案

我最近做了这样的事情,并能够重构它,我相信你想要的。这里有太详细的解释,所以请查看代码中的注释,这个例子:

http://jsbin.com/adaru3/edit


Please see: mycellularcenter.com/phones

I want to duplicate this functionality in javascript/JQuery, but am not familiar enough with the language to even know what to look for.

By functionality, I mean the ability to select one or more of the items in the left column and have the content of the right-hand column show/hide to meet the selected checkbox criteria.

I can make rows/divs show/hide based on clicks on text in other columns, but not sure how to concatenate/iterate? through multiple selections.

Advice/help is appreciated.

JC

解决方案

I recently did something like this, and was able to refactor it to what I believe you want. It's too detailed to explain in here, so check out the comments in the code, and this example:

http://jsbin.com/adaru3/edit

这篇关于根据复选框条件筛选div /表格行-Javascript / JQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆