在将物品装入同位素之前如何对其进行过滤
我正在使用同位素的过滤功能。我写道:
$('#stage').isotope({
filter:selector
});
在两个地方:
$(window).load(function() --> so
that when users type url with
hash(#), they can see the content
items which is filtered out already.
$('.filters
a').click(function(){filter:selector}); --> when users click particular link.
问题是,每当点击 hash 链接或输入带有 hash 的 url 时,浏览器都会先加载所有项目,然后再将其过滤掉。我想要的是:页面仅加载过滤后的项目。
I'm using isotope's filter function. I wrote:
$('#stage').isotope({
filter:selector
});
in two places:
$(window).load(function() --> so
that when users type url with
hash(#), they can see the content
items which is filtered out already.
$('.filters
a').click(function(){filter:selector}); --> when users click particular link.
The problem is that whenever one clicks link which hash or type the url with hash, the browser will load all of the items first and later on filtering it out. What I want is: The page load only filtered items.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论