kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

How to destroy a freewall instance? #56

Closed mi-ca closed 10 years ago

mi-ca commented 10 years ago

Hi, I'm trying to destroy an instance with Modernizr.mq of fitheigh freewall because ux on touch screen is not so good.

Can you help me ?

Thanks in advance

$(window).on('resize',function(){
  if (Modernizr.mq('only screen and (max-width: 768px)')) {
    wall.reset();
    // wall.destroy() ????
    $('.brick').removeAttr('style'); // affect not all the bricks
   }else{
    wall.fitHeight($('.layout').height());
   }
});
kombai commented 10 years ago

I'm sorry, it haven't destroy method. For temporary solution for you right now I think you should check with Modernizr and not init Freewall. I will provide the destroy method later.