I have a filter for jquery masonry - but I want to filter moomasonry

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-06-14T02:20:13Z Indexed on 2010/06/14 2:22 UTC
Read the original article Hit count: 304

Filed under:
|
|
|

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/

© Stack Overflow or respective owner

Related posts about layout

Related posts about div