{"action":"created","issue":{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/268","labels_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/268/comments","events_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/268/events","html_url":"https://github.com/nostalgiaz/bootstrap-switch/issues/268","id":29677097,"number":268,"title":"Ability to prevent switching inside event handler","user":{"login":"raveren","id":364220,"avatar_url":"https://avatars.githubusercontent.com/u/364220?v=3","gravatar_id":"","url":"https://api.github.com/users/raveren","html_url":"https://github.com/raveren","followers_url":"https://api.github.com/users/raveren/followers","following_url":"https://api.github.com/users/raveren/following{/other_user}","gists_url":"https://api.github.com/users/raveren/gists{/gist_id}","starred_url":"https://api.github.com/users/raveren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raveren/subscriptions","organizations_url":"https://api.github.com/users/raveren/orgs","repos_url":"https://api.github.com/users/raveren/repos","events_url":"https://api.github.com/users/raveren/events{/privacy}","received_events_url":"https://api.github.com/users/raveren/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/labels/enhancement","name":"enhancement","color":"207de5"},{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/labels/pending","name":"pending","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"nostalgiaz","id":1184352,"avatar_url":"https://avatars.githubusercontent.com/u/1184352?v=3","gravatar_id":"","url":"https://api.github.com/users/nostalgiaz","html_url":"https://github.com/nostalgiaz","followers_url":"https://api.github.com/users/nostalgiaz/followers","following_url":"https://api.github.com/users/nostalgiaz/following{/other_user}","gists_url":"https://api.github.com/users/nostalgiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/nostalgiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nostalgiaz/subscriptions","organizations_url":"https://api.github.com/users/nostalgiaz/orgs","repos_url":"https://api.github.com/users/nostalgiaz/repos","events_url":"https://api.github.com/users/nostalgiaz/events{/privacy}","received_events_url":"https://api.github.com/users/nostalgiaz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/milestones/15","html_url":"https://github.com/nostalgiaz/bootstrap-switch/milestones/3.4.0","labels_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/milestones/15/labels","id":945158,"number":15,"title":"3.4.0","description":"","creator":{"login":"LostCrew","id":1306576,"avatar_url":"https://avatars.githubusercontent.com/u/1306576?v=3","gravatar_id":"","url":"https://api.github.com/users/LostCrew","html_url":"https://github.com/LostCrew","followers_url":"https://api.github.com/users/LostCrew/followers","following_url":"https://api.github.com/users/LostCrew/following{/other_user}","gists_url":"https://api.github.com/users/LostCrew/gists{/gist_id}","starred_url":"https://api.github.com/users/LostCrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LostCrew/subscriptions","organizations_url":"https://api.github.com/users/LostCrew/orgs","repos_url":"https://api.github.com/users/LostCrew/repos","events_url":"https://api.github.com/users/LostCrew/events{/privacy}","received_events_url":"https://api.github.com/users/LostCrew/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":4,"state":"open","created_at":"2015-01-21T11:55:38Z","updated_at":"2015-05-25T18:22:58Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2014-03-18T19:33:12Z","updated_at":"2015-09-15T07:04:04Z","closed_at":null,"body":"I don't really need this at the moment, this is just for uniformity, other high quality jquery plugins usually implement some way to prevent user from performing actions in event callbacks:\r\n\r\n```javascript\r\n$(\"[name='my-checkbox']\").bootstrapSwitch({\r\n  onSwitchChange: function(e) {\r\n    if( iHaveAReason ) {\r\n       e.preventDefault();\r\n       // or - equivalently\r\n       return false;\r\n    }\r\n  }\r\n});\r\n```\r\n\r\nReturning `false` from event handler would also stop propagation, but in this case, when switches never contain other switches, that's irrelevant."},"comment":{"url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/comments/140299908","html_url":"https://github.com/nostalgiaz/bootstrap-switch/issues/268#issuecomment-140299908","issue_url":"https://api.github.com/repos/nostalgiaz/bootstrap-switch/issues/268","id":140299908,"user":{"login":"santhosh-v","id":8733685,"avatar_url":"https://avatars.githubusercontent.com/u/8733685?v=3","gravatar_id":"","url":"https://api.github.com/users/santhosh-v","html_url":"https://github.com/santhosh-v","followers_url":"https://api.github.com/users/santhosh-v/followers","following_url":"https://api.github.com/users/santhosh-v/following{/other_user}","gists_url":"https://api.github.com/users/santhosh-v/gists{/gist_id}","starred_url":"https://api.github.com/users/santhosh-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santhosh-v/subscriptions","organizations_url":"https://api.github.com/users/santhosh-v/orgs","repos_url":"https://api.github.com/users/santhosh-v/repos","events_url":"https://api.github.com/users/santhosh-v/events{/privacy}","received_events_url":"https://api.github.com/users/santhosh-v/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T07:04:04Z","updated_at":"2015-09-15T07:04:04Z","body":"+1"}}