{"action":"created","issue":{"url":"https://api.github.com/repos/michalsnik/aos/issues/12","repository_url":"https://api.github.com/repos/michalsnik/aos","labels_url":"https://api.github.com/repos/michalsnik/aos/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/michalsnik/aos/issues/12/comments","events_url":"https://api.github.com/repos/michalsnik/aos/issues/12/events","html_url":"https://github.com/michalsnik/aos/issues/12","id":159381179,"number":12,"title":"jQuery document ready","user":{"login":"alex9pro","id":7101211,"avatar_url":"https://avatars.githubusercontent.com/u/7101211?v=3","gravatar_id":"","url":"https://api.github.com/users/alex9pro","html_url":"https://github.com/alex9pro","followers_url":"https://api.github.com/users/alex9pro/followers","following_url":"https://api.github.com/users/alex9pro/following{/other_user}","gists_url":"https://api.github.com/users/alex9pro/gists{/gist_id}","starred_url":"https://api.github.com/users/alex9pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex9pro/subscriptions","organizations_url":"https://api.github.com/users/alex9pro/orgs","repos_url":"https://api.github.com/users/alex9pro/repos","events_url":"https://api.github.com/users/alex9pro/events{/privacy}","received_events_url":"https://api.github.com/users/alex9pro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T11:01:36Z","updated_at":"2016-06-09T11:26:12Z","closed_at":null,"body":"When i init AOS in jQuery document ready function AOS isn't initialized\r\n`\r\n$(document).on('ready', function(){\r\n  AOS.init();\r\n});\r\n`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/michalsnik/aos/issues/comments/224868058","html_url":"https://github.com/michalsnik/aos/issues/12#issuecomment-224868058","issue_url":"https://api.github.com/repos/michalsnik/aos/issues/12","id":224868058,"user":{"login":"michalsnik","id":4093559,"avatar_url":"https://avatars.githubusercontent.com/u/4093559?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsnik","html_url":"https://github.com/michalsnik","followers_url":"https://api.github.com/users/michalsnik/followers","following_url":"https://api.github.com/users/michalsnik/following{/other_user}","gists_url":"https://api.github.com/users/michalsnik/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsnik/subscriptions","organizations_url":"https://api.github.com/users/michalsnik/orgs","repos_url":"https://api.github.com/users/michalsnik/repos","events_url":"https://api.github.com/users/michalsnik/events{/privacy}","received_events_url":"https://api.github.com/users/michalsnik/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T11:26:12Z","updated_at":"2016-06-09T11:26:12Z","body":"Hi, It's because AOS listens for `DOMContentLoaded` event and when you init AOS on document ready, the event is not triggered again, so AOS is not going to be initialized.\r\n\r\nPut `AOS.init()` outside document ready and it'll work fine.\r\n\r\nYou can also set different start event:\r\n```\r\nAOS.init({\r\n   startEvent: 'yourEvent'\r\n});\r\n```\r\nand now you can trigger `yourEvent` on document whenever you want and AOS will be initialized.\r\n\r\nFor example:\r\n```\r\nAOS.init({\r\n  startEvent: 'yourEvent'\r\n});\r\n\r\n$(document).on('ready', function() {\r\n  $(document).trigger('yourEvent');\r\n});\r\n```"}}
{"actor":{"display_login":"michalsnik"}}