{"action":"created","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/482","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/482/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/482/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/482/events","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/482","id":64417840,"number":482,"title":"How to Remove on \"click\" function","user":{"login":"hkcity1111","id":6868985,"avatar_url":"https://avatars.githubusercontent.com/u/6868985?v=3","gravatar_id":"","url":"https://api.github.com/users/hkcity1111","html_url":"https://github.com/hkcity1111","followers_url":"https://api.github.com/users/hkcity1111/followers","following_url":"https://api.github.com/users/hkcity1111/following{/other_user}","gists_url":"https://api.github.com/users/hkcity1111/gists{/gist_id}","starred_url":"https://api.github.com/users/hkcity1111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkcity1111/subscriptions","organizations_url":"https://api.github.com/users/hkcity1111/orgs","repos_url":"https://api.github.com/users/hkcity1111/repos","events_url":"https://api.github.com/users/hkcity1111/events{/privacy}","received_events_url":"https://api.github.com/users/hkcity1111/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-26T02:10:51Z","updated_at":"2015-03-26T14:50:02Z","closed_at":null,"body":"Hi all,\r\n\r\nIf I assign function to on \"click\" event, how to remove on click function and add new on click\r\nIt seems that I assign on click event will be accmulated. i.e. two event assigned previously is called.\r\nThanks a lot !\r\n\r\nRegards,\r\n  Kenneth \r\n```javascript\r\n            cordova.plugins.notification.local.on(\"click\", function (notification, state) {\r\n                // do something \r\n                func.showdetail(notification);\r\n            }, this);\r\n```"},"comment":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/comments/86547932","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/482#issuecomment-86547932","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/482","id":86547932,"user":{"login":"katzer","id":2039384,"avatar_url":"https://avatars.githubusercontent.com/u/2039384?v=3","gravatar_id":"","url":"https://api.github.com/users/katzer","html_url":"https://github.com/katzer","followers_url":"https://api.github.com/users/katzer/followers","following_url":"https://api.github.com/users/katzer/following{/other_user}","gists_url":"https://api.github.com/users/katzer/gists{/gist_id}","starred_url":"https://api.github.com/users/katzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katzer/subscriptions","organizations_url":"https://api.github.com/users/katzer/orgs","repos_url":"https://api.github.com/users/katzer/repos","events_url":"https://api.github.com/users/katzer/events{/privacy}","received_events_url":"https://api.github.com/users/katzer/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T14:50:01Z","updated_at":"2015-03-26T14:50:01Z","body":"To unregister you can use `un()` as opposite from `on()`.\r\n```javascript\r\nvar callback = function () {...}\r\n\r\n// Register callback\r\ncordova.plugins.notification.local.on(\"click\", callback);\r\n// Unregister callback\r\ncordova.plugins.notification.local.un(\"click\", callback);\r\n```"}}