views:

57

answers:

0

Hi,

I'm using jquery masonry for layout. But I am considering moving to mootools. I have found a masonry port to mootools, called moomasonry - http://www.crionics.com/products/opensource/mooMasonry/Demos/basic.html

With help here, I have a filter on the masonry divs by class:

    $('a.filter').click(function(){
  filterBoxes(this.id);
 })

 function filterBoxes(klass){
  if (klass == "all") { klass = "box" }
  $('#holder').find('.' + klass)
   .hide()
   .appendTo('#main')
   .fadeIn('200')
  $('#main').find('.box:not(.' + klass + ')')
   .fadeOut( '200', function(){
    $(this).appendTo('#holder') ;
   });
  setTimeout(function(){ $('#main').masonry() },500);
 }

But, how would I filter divs by class in mootools? and have it reload masonry after each filter. See my site for example: http://jasondaydesign.com/masonry_demo/