HumanBonsai HumanBonsai - 3 months ago 20
jQuery Question

Expanded Preview Closes on Mobile Scroll

I'm using this tutorial to create an expanding preview within a grid of thumbnails. On mobile the expanded div closes when you scroll up or down, and I can't seem to find what's causing it.

http://tympanus.net/codrops/2013/03/19/thumbnail-grid-with-expanding-preview/

New to javascript, so maybe I'm not looking for the right things. Any help appreciated!

Answer

Open js/grid.js file and delete the following code:

setup: function() {
    $( this ).on( "resize", $special.handler );
},
teardown: function() {
    $( this ).off( "resize", $special.handler );
},
Comments