Closed developius closed 9 years ago
Having this issue - the imgs only get layed out after I either zoom in or zoom out on the page. This doesn't happen on any of the example pages. This is my code:
img
$(document).ready(function(){ var albumId = "xxxxxxxxxxxxx"; $.ajax({ dataType:"json", url:'http://graph.facebook.com/' + albumId + '?fields=photos.fields%28images,source,picture,link,name%29,photos.limit%2840%29&_=1425840156371', success:function(incomming){ var photos = incomming.photos.data; for (var key in photos){ $("#photos").append("<img src='" + photos[key].source + "' class='image'>"); } }, error:function(err){ console.log("Error collecting photos: " + JSON.stringify(err, null, 2)); } }); }); $(window).load(function() { var options = { items:3, srcNode: 'img', margin: '20px', width: '250px', resizable: true, transition: 'all 0.5s ease' } $('.grid').gridify(options); });
My .grid element starts out as an empty div.
.grid
div
Appears to be a timing issue.
Having this issue - the
img
s only get layed out after I either zoom in or zoom out on the page. This doesn't happen on any of the example pages. This is my code:My
.grid
element starts out as an emptydiv
.