title: Isotope Filter mootools
body: <p>I am trying to make isotope works with filter the same elements but by two ways, one is filter by links and the other filter by buttons like a carrusel. The links will filter the subgrups, I have 4 groups plus the all elements, and when I click each one just want to show the first two elements of the group and by the left right arrow buttons the next and before elements. I made the group filter works but the carrusell I dont know why I cant...Thanks if anyone can help me with an example.</p>
  
  <pre><code>            var related = $(this.options.itemsBlock);                  
  
              if (related) {
                  var isoFilter = new Isotope(related, {
                      itemSelector: '.item',
                      layoutMode: 'fitRows',
                      sortAscending: {
                          name: true,
                          datesusc: false
                      }
                  });
  
                  if (isoFilter) {
  
                      var buttons = $$('#filters a');
  
                      buttons.addEvent('click', function (e) {
                          e = new Event(e);
                          e.stop();
  
                          var dataFilter = this.get('data-filter');
  
                          isoFilter.arrange({
                              filter: dataFilter
                          });
                      });
  
                      var selectors = $$(this.options.selectorButtons);
  
                      if (selectors) {
                          selectors.removeEvents('click');
                          selectors.addEvent('click', function (e) {
                              e = new Event(e);
                              e.stop();
  
                              var dataFilter1 = '.g1-item-1'; // Just an example of the next two element from the first group
                              isoFilter.arrange({ filter: dataFilter1 });
                          });
                      }
                  }
  </code></pre>