Created
April 18, 2015 15:19
-
-
Save abitdodgy/ff713f19aaed488a3628 to your computer and use it in GitHub Desktop.
Turbolinks example. Binding on document.ready and page:change.
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
$(document).on('ready page:change', function() { | |
$('selector').tooltip('show'); | |
}); |
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
# page:change is a Turbolinks event, fired when the page changes. | |
$(document).on 'ready page:change', -> | |
# Attach events to elements here. For exmaple: a Bootstrap tooltip. | |
$('selector').tooltip 'show' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment