codrops / ThumbnailGridExpandingPreview

A tutorial on how to create a thumbnail grid with an expanding image preview similar to the effect seen on Google Images.
360 stars 143 forks source link

Having multiple instances leaves a portion of the overlay #8

Closed fluxxus closed 10 years ago

fluxxus commented 10 years ago

I need two instances of the grid, thus I changed the grid variable to: var $grid = $( '.og-grid' ).

It all works as expected, but when I close the second instance, the upper part of the overlay doesn't close, leaving a black bar with the close icon. You can see it here: http://madebym.me/test/couch-test/corporate-video.php

Has anyone managed to sucesfully have two or more grids?

fluxxus commented 10 years ago

Got it to work with two grid.js files. One for #og-grid and the other for #og-grid-2. Not sure if this is the best way, but it works.