{"action":"created","issue":{"url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/174","repository_url":"https://api.github.com/repos/eisbehr-/jquery.lazy","labels_url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/174/comments","events_url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/174/events","html_url":"https://github.com/eisbehr-/jquery.lazy/issues/174","id":361207998,"node_id":"MDU6SXNzdWUzNjEyMDc5OTg=","number":174,"title":"Dynamic images loaded all at once when Page load","user":{"login":"omarojo","id":995265,"node_id":"MDQ6VXNlcjk5NTI2NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/995265?v=4","gravatar_id":"","url":"https://api.github.com/users/omarojo","html_url":"https://github.com/omarojo","followers_url":"https://api.github.com/users/omarojo/followers","following_url":"https://api.github.com/users/omarojo/following{/other_user}","gists_url":"https://api.github.com/users/omarojo/gists{/gist_id}","starred_url":"https://api.github.com/users/omarojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarojo/subscriptions","organizations_url":"https://api.github.com/users/omarojo/orgs","repos_url":"https://api.github.com/users/omarojo/repos","events_url":"https://api.github.com/users/omarojo/events{/privacy}","received_events_url":"https://api.github.com/users/omarojo/received_events","type":"User","site_admin":false},"labels":[{"id":25434139,"node_id":"MDU6TGFiZWwyNTQzNDEzOQ==","url":"https://api.github.com/repos/eisbehr-/jquery.lazy/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"eisbehr-","id":917005,"node_id":"MDQ6VXNlcjkxNzAwNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/917005?v=4","gravatar_id":"","url":"https://api.github.com/users/eisbehr-","html_url":"https://github.com/eisbehr-","followers_url":"https://api.github.com/users/eisbehr-/followers","following_url":"https://api.github.com/users/eisbehr-/following{/other_user}","gists_url":"https://api.github.com/users/eisbehr-/gists{/gist_id}","starred_url":"https://api.github.com/users/eisbehr-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eisbehr-/subscriptions","organizations_url":"https://api.github.com/users/eisbehr-/orgs","repos_url":"https://api.github.com/users/eisbehr-/repos","events_url":"https://api.github.com/users/eisbehr-/events{/privacy}","received_events_url":"https://api.github.com/users/eisbehr-/received_events","type":"User","site_admin":false},"assignees":[{"login":"eisbehr-","id":917005,"node_id":"MDQ6VXNlcjkxNzAwNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/917005?v=4","gravatar_id":"","url":"https://api.github.com/users/eisbehr-","html_url":"https://github.com/eisbehr-","followers_url":"https://api.github.com/users/eisbehr-/followers","following_url":"https://api.github.com/users/eisbehr-/following{/other_user}","gists_url":"https://api.github.com/users/eisbehr-/gists{/gist_id}","starred_url":"https://api.github.com/users/eisbehr-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eisbehr-/subscriptions","organizations_url":"https://api.github.com/users/eisbehr-/orgs","repos_url":"https://api.github.com/users/eisbehr-/repos","events_url":"https://api.github.com/users/eisbehr-/events{/privacy}","received_events_url":"https://api.github.com/users/eisbehr-/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-09-18T09:11:20Z","updated_at":"2018-09-21T13:58:45Z","closed_at":"2018-09-21T07:21:43Z","author_association":"NONE","body":"Hi there mate..Thanks for your library.\r\nIm this issue.\r\nall my images get loaded/request as soon as I finish retrieving the json file that has all the urls. \r\nWhat I do is\r\n1- Request a json file with image urls\r\n2- jquery append <img> elements to the page\r\n3- call the lazy() method.\r\n\r\nstill.. all images get loaded.\r\n\r\n\r\nbut this is the important part.You can see in the console how it loads all of them no matter what.\r\n\r\n```JS\r\nfunction creategGrid(data) {\r\n  imagesArray = data;\r\n  imagesArray.forEach(function(element) {\r\n    if (element.document) {\r\n      var imgUrl = element.document.fields.imageUrl.stringValue;\r\n      var artImgCol = $(\"<div>\", {\r\n        'class': 'col-6 col-sm-3 col-md-2 col-lg-2 col-xl-1 mb-3 px-2 mx-0 text-center'\r\n      });\r\n      var artImg = $('<img>', {\r\n        'class': 'lazy mosaic-image'\r\n      })\r\n      artImg.attr(\"data-src\", imgUrl)\r\n      artImgCol.append(artImg);\r\n      $('#mosaicPage').append(artImgCol);\r\n    }\r\n  });\r\n  $(function() {\r\n    $('.lazy').Lazy({\r\n      visibleOnly: true,\r\n      effect: \"fadeIn\",\r\n      effectTime: 2000,\r\n      bind: \"event\",\r\n      afterLoad: function(element) {\r\n        console.log(\"Image Loaded\", element)\r\n      }\r\n    });\r\n  });\r\n}\r\n\r\n```\r\n\r\nany ideas ? "},"comment":{"url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/comments/423540391","html_url":"https://github.com/eisbehr-/jquery.lazy/issues/174#issuecomment-423540391","issue_url":"https://api.github.com/repos/eisbehr-/jquery.lazy/issues/174","id":423540391,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzU0MDM5MQ==","user":{"login":"omarojo","id":995265,"node_id":"MDQ6VXNlcjk5NTI2NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/995265?v=4","gravatar_id":"","url":"https://api.github.com/users/omarojo","html_url":"https://github.com/omarojo","followers_url":"https://api.github.com/users/omarojo/followers","following_url":"https://api.github.com/users/omarojo/following{/other_user}","gists_url":"https://api.github.com/users/omarojo/gists{/gist_id}","starred_url":"https://api.github.com/users/omarojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarojo/subscriptions","organizations_url":"https://api.github.com/users/omarojo/orgs","repos_url":"https://api.github.com/users/omarojo/repos","events_url":"https://api.github.com/users/omarojo/events{/privacy}","received_events_url":"https://api.github.com/users/omarojo/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T13:58:45Z","updated_at":"2018-09-21T13:58:45Z","author_association":"NONE","body":"Thanks for your reply.\n\nMy site is responsive, so the images expand and shrink depending on which device screen the site is loaded. They have width and height set to auto.\nOn Sep 21, 2018, 00:21 -0700, Eisbehr <notifications@github.com>, wrote:\n> Closed #174.\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n"}}
{"actor":{"display_login":"omarojo"}}