【问题标题】:QuickSand jQuery - want to modifications some optionsQuickSand jQuery - 想要修改一些选项
【发布时间】:2013-05-08 22:05:05
【问题描述】:

我现在正在使用 QuickSand,但我不能做一些事情。 我想创建具有 3 个类别的小型画廊,例如:所有、公共汽车、汽车。 如果我通过默认设置使用 QuickSand 执行此操作,则会出现问题,因为当我单击某个类别时,所有其他图像都被隐藏了。我想将焦点图像移动到画廊的顶部,否则移动到底部(NOT HIDING)。

我有一个样本:Sample。特别是我想在网站上这样做 排序方式:名称,大小。但与我的类别。 我尝试这样做,但没有结果:(

也许有人可以帮助我。 最好的欢呼!

【问题讨论】:

  • 谁能帮帮我?

标签: jquery css gallery quicksand


【解决方案1】:

我推荐使用 jQuery Isotope 只是因为排序功能似乎比您使用的要高级一些。流沙似乎提供了很好的过滤功能,但排序功能似乎有所欠缺。

Example

    getSortData: {
        symbol: function ($elem) {
            return $elem.attr('data-symbol');
        },
        category: function ($elem) {
            return $elem.attr('data-category');
        },
        number: function ($elem) {
            return parseInt($elem.find('.number').text(), 10);
        },
        weight: function ($elem) {
            return parseFloat($elem.find('.weight').text().replace(/[\(\)]/g, ''));
        },
        name: function ($elem) {
            return $elem.find('.name').text();
        },
        author: function ($elem) {
            return $elem.find('.author').text();
        },
        date: function ($elem) {
            return Date.parse($elem.find('.date').text());
        }
    }
});

使用 Isotope,您几乎可以对存在的任何信息进行排序,和/或您可以添加“数据类别”以获得更多排序选项。

Isotope Sorting Demo

Isotope Sorting Documentation

注意-尝试在上述演示或示例中调整浏览器窗口的大小。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-07
    • 2023-02-13
    相关资源
    最近更新 更多