Skip to content Skip to sidebar Skip to footer

How To Add And Show A Bootstrap Tooltip Inside A Jquery Click Function?

I am trying to add and display a Bootstrap 3 tooltip from within a click function in jQuery. It works well when I'm using an anonymous function for the click handler, but if I try

Solution 1:

You need to wrap your target with jQuery selector to use .tooltip().

Do $button = $(event.target); instead of $button = event.target;.

Prepend your variable with $ if, and only if, your variable stores a jQuery object.

Post a Comment for "How To Add And Show A Bootstrap Tooltip Inside A Jquery Click Function?"