Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhileshdarjee/fe39d92a3047f1e8a40d24a02facbc7e to your computer and use it in GitHub Desktop.
Save akhileshdarjee/fe39d92a3047f1e8a40d24a02facbc7e to your computer and use it in GitHub Desktop.
Best way to apply bootstrap tooltip across the application
$("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