{"action":"created","issue":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/1033","labels_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/1033/comments","events_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/1033/events","html_url":"https://github.com/RobinHerbots/jquery.inputmask/issues/1033","id":106386603,"number":1033,"title":"oncomplete not called when set with option function","user":{"login":"itslittlejohn","id":2136925,"avatar_url":"https://avatars.githubusercontent.com/u/2136925?v=3","gravatar_id":"","url":"https://api.github.com/users/itslittlejohn","html_url":"https://github.com/itslittlejohn","followers_url":"https://api.github.com/users/itslittlejohn/followers","following_url":"https://api.github.com/users/itslittlejohn/following{/other_user}","gists_url":"https://api.github.com/users/itslittlejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/itslittlejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itslittlejohn/subscriptions","organizations_url":"https://api.github.com/users/itslittlejohn/orgs","repos_url":"https://api.github.com/users/itslittlejohn/repos","events_url":"https://api.github.com/users/itslittlejohn/events{/privacy}","received_events_url":"https://api.github.com/users/itslittlejohn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/labels/Main","name":"Main","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/milestones/15","html_url":"https://github.com/RobinHerbots/jquery.inputmask/milestones/3.3","labels_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/milestones/15/labels","id":807303,"number":15,"title":"3.3","description":"Get mobile finally working","creator":{"login":"RobinHerbots","id":318447,"avatar_url":"https://avatars.githubusercontent.com/u/318447?v=3","gravatar_id":"","url":"https://api.github.com/users/RobinHerbots","html_url":"https://github.com/RobinHerbots","followers_url":"https://api.github.com/users/RobinHerbots/followers","following_url":"https://api.github.com/users/RobinHerbots/following{/other_user}","gists_url":"https://api.github.com/users/RobinHerbots/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinHerbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinHerbots/subscriptions","organizations_url":"https://api.github.com/users/RobinHerbots/orgs","repos_url":"https://api.github.com/users/RobinHerbots/repos","events_url":"https://api.github.com/users/RobinHerbots/events{/privacy}","received_events_url":"https://api.github.com/users/RobinHerbots/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":6,"state":"open","created_at":"2014-09-29T19:45:13Z","updated_at":"2015-09-15T13:01:24Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-09-14T17:04:05Z","updated_at":"2015-09-15T15:59:33Z","closed_at":null,"body":"I'm attempting to set the `oncomplete` method using the new `option` function, but something seems to be going wrong.\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n  <title>Testing</title>\r\n\r\n  <script type=\"text/javascript\" src=\"jquery-1.11.2.js\"></script>\r\n  <script type=\"text/javascript\" src=\"inputmask.js\"></script>\r\n  <script type=\"text/javascript\" src=\"jquery.inputmask.js\"></script>\r\n\r\n  <script type=\"text/javascript\">\r\n    $(document).ready(function() {\r\n      $(\"#my-val\").inputmask(\"999-99-9999\", {\r\n        oncomplete: function() {\r\n          console.log(\"howdy!\");\r\n        }\r\n      });\r\n\r\n      $('#my-val').inputmask('option', {\r\n        oncomplete: function() {\r\n          console.log(\"hello!\");\r\n        }\r\n      });\r\n    });\r\n  </script>\r\n</head>\r\n<body>\r\n  <input type=\"text\" id=\"my-val\" />\r\n  <input type=\"text\" />\r\n</body>\r\n</html>\r\n```\r\n\r\ncalling `$('#my-val').inputmask('option', 'oncomplete')` shows that the function has indeed been updated to reflect the new `\"hello!\"` message, but when I actually complete the mask, it still logs the original `\"howdy!\"` message. "},"comment":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/comments/140442230","html_url":"https://github.com/RobinHerbots/jquery.inputmask/issues/1033#issuecomment-140442230","issue_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/1033","id":140442230,"user":{"login":"itslittlejohn","id":2136925,"avatar_url":"https://avatars.githubusercontent.com/u/2136925?v=3","gravatar_id":"","url":"https://api.github.com/users/itslittlejohn","html_url":"https://github.com/itslittlejohn","followers_url":"https://api.github.com/users/itslittlejohn/followers","following_url":"https://api.github.com/users/itslittlejohn/following{/other_user}","gists_url":"https://api.github.com/users/itslittlejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/itslittlejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itslittlejohn/subscriptions","organizations_url":"https://api.github.com/users/itslittlejohn/orgs","repos_url":"https://api.github.com/users/itslittlejohn/repos","events_url":"https://api.github.com/users/itslittlejohn/events{/privacy}","received_events_url":"https://api.github.com/users/itslittlejohn/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T15:59:33Z","updated_at":"2015-09-15T15:59:33Z","body":"@RobinHerbots I tried to follow the documentation you added for the `option` function, but am I doing it wrong? Also, if there are any options that you know for a fact work with this function, let me know and I can try my hand at a fix for this."}}