Created
April 22, 2019 14:31
-
-
Save akhileshdarjee/fe39d92a3047f1e8a40d24a02facbc7e to your computer and use it in GitHub Desktop.
Best way to apply bootstrap tooltip across the application
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
$("body").tooltip({ | |
selector: '[data-toggle="tooltip"]', | |
trigger : 'hover' | |
}); | |
// selector: This method helps to initialise tooltips and works even if tooltip is generated dynamically | |
// trigger: This will show tooltip only when the cursor is placed on the element. | |
// When clicked on any element or button, the tooltip stays intact even if the cursor if not placed on it. | |
// The 'trigger' method helps to solves this issue and show only when cursor is placed on the element |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment