搜索后重新使用ISOtope元素 [英] Resorting ISOtope elements after Search
问题描述
我正在为威斯康星州Bad队开发一个新的名人堂.我的Beta版本可以在 http://www.uwbadgers.com/athletic中查看-dept/hall-fame-beta.html
I'm developing a new Hall of Fame for the Wisconsin Badgers. My beta version is viewable at http://www.uwbadgers.com/athletic-dept/hall-fame-beta.html
我的问题是,当使用搜索功能时,如何将可见元素置于顶部.它显示正确的元素,并使用display:none隐藏其他元素.但是,它不会在搜索和显示之后重新定位元素:没有元素仍然占据空间.
My question is, when the search feature is used how do I bring the visible elements to the top. It show the correct elements and uses display:none to hide the others. However it does not re-position the elements after the search and the display:none elements still take up space.
它与同位素使用的"-webkit-transform"样式有关.我该如何进行更改?或者有没有更好的方法来使用同位素进行搜索?
It has to do with the "-webkit-transform" style that isotope uses. How do I go about changing this or is there a better way to search using isotope?
我正在使用 http://lomalogue.com/jquery/quicksearch/进行搜索,我想不出一种单独使用同位素的方法.
I am using http://lomalogue.com/jquery/quicksearch/ for the search as I could not think of a way to do it with isotope alone.
推荐答案
我将使用quicksearch的show
和hide
选项添加适当的类,以用于同位素过滤
I would use quicksearch's show
and hide
options to add appropriate classes that can be used for filtering by Isotope
$('input#id_search').quicksearch('div.member', {
show: function () {
$(this).addClass('quicksearch-visible');
},
hide: function() {
$(this).removeClass('quicksearch-visible');
},
onAfter: function() {
$container.isotope({ filter: 'quicksearch-visible'});
}
});
这篇关于搜索后重新使用ISOtope元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!