同位素过滤项目例外?
我使用以下代码通过过滤器菜单过滤网格中的内容 http://themes.visualise.ca /visualise/
$('.menu-categories-navigation-container a').click(function(){
var category = $(this).parent().attr('class');
var filters = ('.'+category);
$container.isotope({
filter: filters,
});
return false;
});
但我希望具有 .thelogo 类的项目始终保持可见,因为徽标和菜单是我的网格的一部分。所以我想我可以使用一些语法来添加某种异常?也许有更好的方法?
非常感谢您的时间和帮助。
I use the following code to filter the content in my grid via my filter menu at http://themes.visualise.ca/visualise/
$('.menu-categories-navigation-container a').click(function(){
var category = $(this).parent().attr('class');
var filters = ('.'+category);
$container.isotope({
filter: filters,
});
return false;
});
But I would like the item with the .thelogo class to always remain visible since the logo and menu are part of my grid. So I thought I could maybe use some syntax in order to add some kind of exception? Maybe there is a better way?
Many thanks for your time and help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
同位素中的过滤器属性是一个选择器字符串,可以随意添加复合选择器(只需添加 .thelogo 即可)。
ps:如果任何项目有多个类别,这将失败。因为选择器会认为它正在第一个类中寻找具有第二个类名称的标签。
编辑:忘记了时期
The filter property in isotope is a selector string, feel free to add compound selectors (just add .thelogo to it).
ps: this will fail if any item has more than one class. As the selector would think it was looking for a tag with the name of the second class, inside the first.
edit: forgot period
解决方案...
The solution...