{"action":"created","issue":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/228","repository_url":"https://api.github.com/repos/1000hz/bootstrap-validator","labels_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/228/comments","events_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/228/events","html_url":"https://github.com/1000hz/bootstrap-validator/issues/228","id":112357292,"number":228,"title":"Validator is not autoloaded when you lazy load the plugin","user":{"login":"wachri","id":851611,"avatar_url":"https://avatars.githubusercontent.com/u/851611?v=3","gravatar_id":"","url":"https://api.github.com/users/wachri","html_url":"https://github.com/wachri","followers_url":"https://api.github.com/users/wachri/followers","following_url":"https://api.github.com/users/wachri/following{/other_user}","gists_url":"https://api.github.com/users/wachri/gists{/gist_id}","starred_url":"https://api.github.com/users/wachri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wachri/subscriptions","organizations_url":"https://api.github.com/users/wachri/orgs","repos_url":"https://api.github.com/users/wachri/repos","events_url":"https://api.github.com/users/wachri/events{/privacy}","received_events_url":"https://api.github.com/users/wachri/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T12:28:56Z","updated_at":"2016-02-25T17:30:34Z","closed_at":"2016-02-25T17:30:34Z","body":"When you use the validator in an AMD (e.g. requirejs) environment and you are loading the script after the window fired the 'load\" event the validator doesn't get autoloaded.\r\n\r\nI changed ```$(window).on('load', function () {``` to \r\n```$(window).load(function () ``` and fixed the issue."},"comment":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/comments/188892795","html_url":"https://github.com/1000hz/bootstrap-validator/issues/228#issuecomment-188892795","issue_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/228","id":188892795,"user":{"login":"1000hz","id":1395018,"avatar_url":"https://avatars.githubusercontent.com/u/1395018?v=3","gravatar_id":"","url":"https://api.github.com/users/1000hz","html_url":"https://github.com/1000hz","followers_url":"https://api.github.com/users/1000hz/followers","following_url":"https://api.github.com/users/1000hz/following{/other_user}","gists_url":"https://api.github.com/users/1000hz/gists{/gist_id}","starred_url":"https://api.github.com/users/1000hz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1000hz/subscriptions","organizations_url":"https://api.github.com/users/1000hz/orgs","repos_url":"https://api.github.com/users/1000hz/repos","events_url":"https://api.github.com/users/1000hz/events{/privacy}","received_events_url":"https://api.github.com/users/1000hz/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T17:30:34Z","updated_at":"2016-02-25T17:30:34Z","body":"I think you might have just been getting lucky that the change you made fixed the issue. `$.fn.load()` is a shortcut for `$.fn.on('load')`. See http://api.jquery.com/load-event\r\n\r\nIn AMD environments, I'd recommend initializing your validators manually via JS."}}