同位素-从特定类别而不是所有元素开始 [英] Isotope - Start with specific category rather than All elements

查看:50
本文介绍了同位素-从特定类别而不是所有元素开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的同位素插件有一个小问题.加载我的网页后,同位素将显示所有元素.我想让它显示一个类别.我该如何实现?

I have a small issue with the isotope plugin. When my web page is loaded, Isotope will display all the elements. I'd like to have it display a single category instead. How can i achieve it?

提前感谢您的帮助!

推荐答案

只需在首次调用同位素的选项中提供一个过滤器,该过滤器将仅选择您想要的项目:

Just supply a filter in the options of your initial call to isotope that will select only the items you want:

$('#someid').isotope({filter: '.someclassonMyCategoryElements'});

PS.如果您显示现有代码,这将有所帮助,因此我们都有一些可以使用的上下文:)

这篇关于同位素-从特定类别而不是所有元素开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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