Robert Regue
Mon, 28 Jul 2014 05:25:30 GMT
It should be fine, did you init and reinit masonry layout within pageInit callback?
This is what I do: if (page.name=='grid') { //create grid list using data (image and name) myApp.createGrid(myApp.data); var $grid = $('#gridContainer'); $grid.imagesLoaded( function() { $grid.masonry({ columnWidth: 150, itemSelector: '.element', gutter: 10, }); }); } myApp.data can vary and creatGrid() loops through a simple template and created the html on the #gridContainer. Is there a better way to do it?
The first potential problem i see here is using of ID attribute in '#gridContainer' selector. Try to use classes instead: --- var $grid = $(page.container).find('.gridContainer');