How do you initialize a Bootstrap tooltip using jQuery?

  • $('.tooltip').tooltip()
  • $('#myTooltip').initTooltip()
  • $('[data-toggle="tooltip"]').tooltip()
  • $('.btn').addTooltip()
To initialize a Bootstrap tooltip using jQuery, you can use the following code: $('[data-toggle="tooltip"]').tooltip(). This selects all elements with the data-toggle attribute set to "tooltip" and initializes the Bootstrap tooltip on them.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *