{"action":"created","issue":{"url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/2446","repository_url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2","labels_url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/2446/labels{/name}","comments_url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/2446/comments","events_url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/2446/events","html_url":"https://github.com/OwlCarousel2/OwlCarousel2/issues/2446","id":361924292,"node_id":"MDU6SXNzdWUzNjE5MjQyOTI=","number":2446,"title":"Owl Carousel is not working on adding images to it dynamically.","user":{"login":"MayankValechha","id":32395977,"node_id":"MDQ6VXNlcjMyMzk1OTc3","avatar_url":"https://avatars2.githubusercontent.com/u/32395977?v=4","gravatar_id":"","url":"https://api.github.com/users/MayankValechha","html_url":"https://github.com/MayankValechha","followers_url":"https://api.github.com/users/MayankValechha/followers","following_url":"https://api.github.com/users/MayankValechha/following{/other_user}","gists_url":"https://api.github.com/users/MayankValechha/gists{/gist_id}","starred_url":"https://api.github.com/users/MayankValechha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MayankValechha/subscriptions","organizations_url":"https://api.github.com/users/MayankValechha/orgs","repos_url":"https://api.github.com/users/MayankValechha/repos","events_url":"https://api.github.com/users/MayankValechha/events{/privacy}","received_events_url":"https://api.github.com/users/MayankValechha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T20:56:26Z","updated_at":"2018-09-21T10:31:55Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n# Currently I'm working on a small eCommerce project, I'm using Parse Server in Back4app.com.\r\n\r\nI'm using Owl Carousel for showing the images. When I manually add images in a **.owl-carousel** class It is working fine.\r\n\r\nBut when I add images to the **.owl-carousel** class from my Parse Server, It is not showing that Images in a Carousel, \r\n\r\nI am using vanilla JavaScript to create elements and show in a div.\r\nHere is my **HTML Code** -\r\n```\r\n<div id=\"ads\" class=\"owl-carousel\">\r\n \r\n</div>\r\n```\r\nHere is my **JS Code** - \r\n```\r\nlet output = '';\r\nvar query = new Parse.Query('Offers');\r\nquery.find().then(function(result){\r\n     for(let a in result){\r\n     output += \r\n           '<img src=\"'+result[a].get('offerImage').url()+'\">';\r\n       }\r\n        document.getElementById('ads').innerHTML = output; \r\n});\r\n```\r\n![error](https://user-images.githubusercontent.com/32395977/45781195-f6f4b900-bc7c-11e8-817c-34ba75c38ba6.PNG)\r\n\r\nOutput Images is also attached, you can see that above all the images are inside a **.owl-carousel** class.\r\nAny Help on this topic will be appreciable.\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/comments/423488661","html_url":"https://github.com/OwlCarousel2/OwlCarousel2/issues/2446#issuecomment-423488661","issue_url":"https://api.github.com/repos/OwlCarousel2/OwlCarousel2/issues/2446","id":423488661,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzQ4ODY2MQ==","user":{"login":"keefyhub","id":8536452,"node_id":"MDQ6VXNlcjg1MzY0NTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8536452?v=4","gravatar_id":"","url":"https://api.github.com/users/keefyhub","html_url":"https://github.com/keefyhub","followers_url":"https://api.github.com/users/keefyhub/followers","following_url":"https://api.github.com/users/keefyhub/following{/other_user}","gists_url":"https://api.github.com/users/keefyhub/gists{/gist_id}","starred_url":"https://api.github.com/users/keefyhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keefyhub/subscriptions","organizations_url":"https://api.github.com/users/keefyhub/orgs","repos_url":"https://api.github.com/users/keefyhub/repos","events_url":"https://api.github.com/users/keefyhub/events{/privacy}","received_events_url":"https://api.github.com/users/keefyhub/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T10:31:55Z","updated_at":"2018-09-21T10:31:55Z","author_association":"CONTRIBUTOR","body":"I think this is because you are initialising the carousel before the images are loaded. If you can trigger a refresh after the images have been inserted it should work\r\n\r\n`$('#ads').trigger('refresh.owl.carousel');`"}}
{"actor":{"display_login":"keefyhub"}}