5

I am working with the jQuery isotope plugin and would like to display only items from a particular group when the page loads. Currently all of the items are displaying:

http://aproposstudio.com/category/work/

For example, on the link above, is there a way to load the page with the 'murals' displaying?

thanks.

superUntitled
  • 22,351
  • 30
  • 83
  • 110

3 Answers3

6

The answer is quite easy:

$('#container').isotope({ filter: '.your-filter-name' });

Use this line in your code.

Refere this link: http://isotope.metafizzy.co/docs/filtering.html

Sandip Armal Patil
  • 6,241
  • 21
  • 93
  • 160
madvertising
  • 69
  • 1
  • 2
1

So i think you just want to use the simple hide() and show() methods

If you use the classes applied to your html elements, you can easily select them and hide them with the following jQuery lines.

$(".project").hide()
$(".murals").show()

now, what this will do is 'hide' all of the projects, and show only the murals.

Does that make sense?

BananaNeil
  • 10,322
  • 7
  • 46
  • 66
0

It's very simple!

(function ($) {
    $(window).load(function () {

        // settings
        var sortBy = 'date', // SORTING: date / name
            sortAscending = true, // SORTING ORDER: true = Ascending / false = Descending

            theFilter = '.YOUR SORT'; // DEFAULT FILTERING CATEGORY
Hugo Dozois
  • 8,147
  • 12
  • 54
  • 58