how to use the isotope plugin in 2 different grid

1

How can I use the isotope plugin in two grids different. for example I am using tabs of bootstrap in my first tab I have the first load of the grid and in the last tab I have the last load of grid . but I can not make both of them work simultaneously it only loads my first grid with the effects of isotope and my second grid it does not load with the effects, it only loads if I open the developer mode of chrome . anyone know how I can use this simultaneously?

my js code:

window.onload = function () {
    if ($.find('.gridlayout').length) {
      $('.gridlayout').isotope({
          itemSelector: '.grid-item',
          masonry: {
            columnWidth: '.grid-item'
          }
      });
    }
};

My html code:

<div class="tab-pane" id="m_tabs_6_4" role="tabpanel">
    <div class="col-xl-12">         
      <div class="gridlayout-main">
        <div class="gridlayout1">
          <div class="grid-item">                           
            <img class="img-responsive" alt="gallery-image" src="caminho da img">
         </div>
       </div>
     </div>
   </div>
</div>
    
asked by anonymous 16.04.2018 / 15:23

0 answers