0

I'm using QuickSand right now, but i cant do some things. I want to create small gallery with 3 categories, for example: All, Bus, Cars. If I do it with QuickSand via default setting, it's problem, cos when I click some categorie all else image are hidden. I want to move focus image at a top of gallery, and else bottom ( NOT HIDING ).

I have a sample right there: Sample. especially I want to do that like on the site Sort by: Name, Size. But with my categories. I trying do that, with no result :(

Maybe someone could help me. Best cheers!

Grzegorz
  • 49
  • 2
  • 10

1 Answers1

0

I recommend using jQuery Isotope simply because the sorting function seems to be a little more advanced than what you're using. Quicksand seems to offer filtering pretty well, but the sorting function seems to be lacking a bit.

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());
        }
    }
});

With Isotope you can sort by pretty much any information that's present, and/or you can add a 'data-category' for even more sorting options.

Isotope Sorting Demo

Isotope Sorting Documentation

Note- Try resizing the browser window on the above demo or example.

apaul
  • 16,092
  • 8
  • 47
  • 82