{"action":"created","issue":{"url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/158","labels_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/158/comments","events_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/158/events","html_url":"https://github.com/webcreate/infinite-ajax-scroll/issues/158","id":41047854,"number":158,"title":"infinite ajax scroll + masonry + imagesloaded","user":{"login":"aydcery","id":7936795,"avatar_url":"https://avatars.githubusercontent.com/u/7936795?v=3","gravatar_id":"","url":"https://api.github.com/users/aydcery","html_url":"https://github.com/aydcery","followers_url":"https://api.github.com/users/aydcery/followers","following_url":"https://api.github.com/users/aydcery/following{/other_user}","gists_url":"https://api.github.com/users/aydcery/gists{/gist_id}","starred_url":"https://api.github.com/users/aydcery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aydcery/subscriptions","organizations_url":"https://api.github.com/users/aydcery/orgs","repos_url":"https://api.github.com/users/aydcery/repos","events_url":"https://api.github.com/users/aydcery/events{/privacy}","received_events_url":"https://api.github.com/users/aydcery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-08-25T09:57:02Z","updated_at":"2015-01-16T11:10:16Z","closed_at":null,"body":"this code is working fine , but sometimes leaving a gap , like this \r\n\r\n![issue](http://s30.postimg.org/xgkqzhogx/serious_pb_on_script.jpg)\r\n\r\nand this is my code ;\r\n\r\n    var container = document.querySelector('#container');\r\n    var msnry;\r\n    // initialize Masonry after all images have loaded\r\n    imagesLoaded( container, function() {\r\n    msnry = new Masonry( container, {\r\n\t\titemSelector : '.box',\r\n\t\tisFitWidth: true,\r\n\t\tcolumnWidth: 236,\r\n\t\tgutter: 14\r\n    });\r\n\t$('#loading').hide();\r\n    });\r\n\r\n    var ias = $.ias({\r\n      container: \"#container\",\r\n      item: \".box\",\r\n      pagination: \".page-links-list\",\r\n      next: \".page-next\",\r\n      delay: 0,\r\n\t  negativeMargin: 200\r\n    });\r\n\r\n    ias.on('render', function(items) {\r\n      $(items).css({ opacity: 0 });\r\n    });\r\n\t\r\n    ias.on('rendered', function(items) {\r\n\timagesLoaded( container, function() {\r\n\tmsnry.appended(items);\r\n\t});\r\n\t});\r\n\t\r\n\tias.extension(new IASSpinnerExtension());\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/comments/70239496","html_url":"https://github.com/webcreate/infinite-ajax-scroll/issues/158#issuecomment-70239496","issue_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/158","id":70239496,"user":{"login":"fieg","id":1086908,"avatar_url":"https://avatars.githubusercontent.com/u/1086908?v=3","gravatar_id":"","url":"https://api.github.com/users/fieg","html_url":"https://github.com/fieg","followers_url":"https://api.github.com/users/fieg/followers","following_url":"https://api.github.com/users/fieg/following{/other_user}","gists_url":"https://api.github.com/users/fieg/gists{/gist_id}","starred_url":"https://api.github.com/users/fieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fieg/subscriptions","organizations_url":"https://api.github.com/users/fieg/orgs","repos_url":"https://api.github.com/users/fieg/repos","events_url":"https://api.github.com/users/fieg/events{/privacy}","received_events_url":"https://api.github.com/users/fieg/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T11:10:16Z","updated_at":"2015-01-16T11:10:16Z","body":"I think the gaps are caused because the images don't have a fixed height and are sometimes loaded after IAS. Therefor some offsets are calculated incorrect. Can someone verify this by trying to set fixed heights?"}}