【发布时间】:2015-04-02 11:50:26
【问题描述】:
我正在尝试设置一个具有同位素过滤功能的页面。 这是我的代码:
$(document).ready(function() {
var $container = $('#isotope');
$container.imagesLoaded(function() {
// init
$container.isotope({
// options
itemSelector : '.col-md-4',
layoutMode : 'masonry',
masonry : {
columnWidth : $container.find('.grid-sizer')[0],
gutter : 0
}
});
});
$(function() {
// filter functions
// bind filter button click
$('a.title').on('click', function() {
var filterValue = $(".col-md-4").attr('data-filter');
// use filterFn if matches value
$container.isotope({
filter : filterValue
});
});
});
});
过滤在 Chrome 中运行良好。在 Firefox 中,只有砌体有效,过滤功能无效。我也尝试简单地按类过滤,这也不起作用。奇怪的是,Isotope Demo 在 Firefox 中运行良好...... 谢谢你的帮助。 M
【问题讨论】:
-
您需要制作一个 jsfiddle 或至少发布您的 html。
标签: jquery firefox filter jquery-isotope