how to use the Isotope plugin on 2 different grid

Asked

Viewed 65 times

1

how can I use the plugin isotope in two grids distinct. for example I am using tabs of bootstrap in my first tab i have the first loading of the grid and the last tab I got the last shipment from grid. but I can’t get both of them to work simultaneously he only carries 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. someone knows how I can use it simultaneously?

my code js:

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>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.