Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
首先这是脚本的工作方式:jsfiddle
'searchList' 设置指定将被搜索的内容。在这种情况下,它是可搜索的 tr。最后,“searchItem”设置允许深入并指定要搜索的单个元素。在这种情况下,我使用“td”。
在这个小提琴
我有一个包含一些信息的缩略图列表,我想做的是能够搜索“某物”,然后显示与该特定缩略图相关的图像和文本。希望你明白我想要达到的目标。
在一个肢体上,但你的选择器searchList看起来不对:
searchList
'searchList' : '.imgscontainer portfolio-v6-items ',
当然,第二类前面应该有一个点,它们在同一个元素上,所以没有空格:
class="imgscontainer portfolio-v6-items"