Last active
December 24, 2015 04:39
-
-
Save nofxx/6745167 to your computer and use it in GitHub Desktop.
Fix bootstrap tabs! Go back in F5/reload/etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Fix bootstrap tabs! Go back in F5/reload/etc | |
# | |
doc.on 'created', '.tab-fix', -> | |
hash = document.location.hash; | |
if (hash) | |
$(@).find("a[href='#{hash}']").tab('show') | |
for link in $(@).find('a') | |
do (link) -> | |
$(link).on 'click', (e) -> | |
window.location.hash = e.target.hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment