{"action":"created","issue":{"url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/98","labels_url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/98/comments","events_url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/98/events","html_url":"https://github.com/mouse0270/bootstrap-notify/issues/98","id":88867776,"number":98,"title":"update({'icon'... not working after update({'icon'...","user":{"login":"defkev","id":5265345,"avatar_url":"https://avatars.githubusercontent.com/u/5265345?v=3","gravatar_id":"","url":"https://api.github.com/users/defkev","html_url":"https://github.com/defkev","followers_url":"https://api.github.com/users/defkev/followers","following_url":"https://api.github.com/users/defkev/following{/other_user}","gists_url":"https://api.github.com/users/defkev/gists{/gist_id}","starred_url":"https://api.github.com/users/defkev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defkev/subscriptions","organizations_url":"https://api.github.com/users/defkev/orgs","repos_url":"https://api.github.com/users/defkev/repos","events_url":"https://api.github.com/users/defkev/events{/privacy}","received_events_url":"https://api.github.com/users/defkev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-16T23:40:48Z","updated_at":"2015-06-16T23:50:05Z","closed_at":null,"body":"Updating the icon more than once doesn't work because .update() will always search/replace the initial icon\\class instead of the actual icon\\class.\r\n\r\nExample:\r\n```javascript\r\nvar progress = $.notify({\r\n   icon: 'fa fa-refresh',\r\n   message: 'Working...'\r\n})\r\n// Do something\r\nprogress.update({\r\n   'icon': 'fa fa-times',\r\n   'message': 'That didn't work, retrying...'\r\n]}\r\n// Try again\r\nprogress.update({\r\n   'icon': 'fa fa-check',\r\n   'message': 'Done!'\r\n})\r\n```\r\nThe second update won't change the icon as the class will look like \"fa fa-times fa-check\" instead of \"fa fa-check\"\r\n\r\nFix:\r\nIn bootstrap-notify.js on line 127 change\r\n```javascript\r\n$icon.removeClass(self.settings.content.icon).addClass(commands[command]);\r\n```\r\nto\r\n```javascript\r\n$icon.removeClass($icon.attr('class')).addClass(commands[command]);\r\n```\r\nso we replace the actual icon instead of the initial icon."},"comment":{"url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/comments/112604672","html_url":"https://github.com/mouse0270/bootstrap-notify/issues/98#issuecomment-112604672","issue_url":"https://api.github.com/repos/mouse0270/bootstrap-notify/issues/98","id":112604672,"user":{"login":"defkev","id":5265345,"avatar_url":"https://avatars.githubusercontent.com/u/5265345?v=3","gravatar_id":"","url":"https://api.github.com/users/defkev","html_url":"https://github.com/defkev","followers_url":"https://api.github.com/users/defkev/followers","following_url":"https://api.github.com/users/defkev/following{/other_user}","gists_url":"https://api.github.com/users/defkev/gists{/gist_id}","starred_url":"https://api.github.com/users/defkev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defkev/subscriptions","organizations_url":"https://api.github.com/users/defkev/orgs","repos_url":"https://api.github.com/users/defkev/repos","events_url":"https://api.github.com/users/defkev/events{/privacy}","received_events_url":"https://api.github.com/users/defkev/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T23:50:05Z","updated_at":"2015-06-16T23:50:05Z","body":"Legit concern, didn't think about this as i am not using a template...yet :)"}}