{"action":"created","issue":{"url":"https://api.github.com/repos/blivesta/animsition/issues/66","labels_url":"https://api.github.com/repos/blivesta/animsition/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/blivesta/animsition/issues/66/comments","events_url":"https://api.github.com/repos/blivesta/animsition/issues/66/events","html_url":"https://github.com/blivesta/animsition/pull/66","id":105717971,"number":66,"title":"Add ability to hide content after transition","user":{"login":"tegansnyder","id":1200195,"avatar_url":"https://avatars.githubusercontent.com/u/1200195?v=3","gravatar_id":"","url":"https://api.github.com/users/tegansnyder","html_url":"https://github.com/tegansnyder","followers_url":"https://api.github.com/users/tegansnyder/followers","following_url":"https://api.github.com/users/tegansnyder/following{/other_user}","gists_url":"https://api.github.com/users/tegansnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/tegansnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tegansnyder/subscriptions","organizations_url":"https://api.github.com/users/tegansnyder/orgs","repos_url":"https://api.github.com/users/tegansnyder/repos","events_url":"https://api.github.com/users/tegansnyder/events{/privacy}","received_events_url":"https://api.github.com/users/tegansnyder/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-10T02:02:11Z","updated_at":"2015-09-22T11:08:04Z","closed_at":"2015-09-22T11:08:04Z","pull_request":{"url":"https://api.github.com/repos/blivesta/animsition/pulls/66","html_url":"https://github.com/blivesta/animsition/pull/66","diff_url":"https://github.com/blivesta/animsition/pull/66.diff","patch_url":"https://github.com/blivesta/animsition/pull/66.patch"},"body":"Sometimes it may be beneficial to hide certain content after the transition before the page loads. I have added an additional option called `hideElementAfterTrans` which allows you to pass a class to hide after the transition completes just prior to page load.\r\n\r\nThis can be useful when you are binding the animsition transition to something other than the typical link tag. For instance if you tried it to a input type that submitted a login form you could add a placeholder href tag to the input type like this:\r\n\r\n```html\r\n<form id=\"login\" method=\"POST\" class=\"page-transition-wrapper hide-me-after-transition\">\r\n<input href=\"#process_login\" class=\"button page-transition-link\" data-animsition-out=\"flip-out-y\" data-animsition-out-duration=\"500\" type=\"submit\" value=\"Log In\" title=\"Log In\" />\r\n</form>\r\n```\r\n```js\r\n$(function() {\r\n\r\n  $('.page-transition-wrapper').animsition({\r\n    linkElement: '.page-transition-link',\r\n    hideElementAfterTrans: '.hide-me-after-transition'\r\n  });\r\n\r\n  // capture the hashchange event to look for the redirect to\r\n  // the href tag #process_login by animsition transition\r\n  // then submit the form\r\n  $(window).on('hashchange',function() { \r\n    if (location.hash == '#process_login') {\r\n      document.getElementById('login').submit();\r\n    }\r\n  });\r\n\r\n});\r\n```\r\n\r\nIf this PR is something that can be accomplished by adding an additional binding mechanism to the library for events other than `click` then I'm all for it, and this PR should be rightly closed. For the time being this provided me with a quick to getting this working on elements other than link tags and gives the flexibility of hiding content after transition.\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/blivesta/animsition/issues/comments/142251192","html_url":"https://github.com/blivesta/animsition/pull/66#issuecomment-142251192","issue_url":"https://api.github.com/repos/blivesta/animsition/issues/66","id":142251192,"user":{"login":"blivesta","id":3160395,"avatar_url":"https://avatars.githubusercontent.com/u/3160395?v=3","gravatar_id":"","url":"https://api.github.com/users/blivesta","html_url":"https://github.com/blivesta","followers_url":"https://api.github.com/users/blivesta/followers","following_url":"https://api.github.com/users/blivesta/following{/other_user}","gists_url":"https://api.github.com/users/blivesta/gists{/gist_id}","starred_url":"https://api.github.com/users/blivesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blivesta/subscriptions","organizations_url":"https://api.github.com/users/blivesta/orgs","repos_url":"https://api.github.com/users/blivesta/repos","events_url":"https://api.github.com/users/blivesta/events{/privacy}","received_events_url":"https://api.github.com/users/blivesta/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T11:08:04Z","updated_at":"2015-09-22T11:08:04Z","body":"Thank you. 948c33cfcce3bde2686fd1c36963eec67f77f55b"}}