Ulad Kasach
Ulad Kasach

Reputation: 12808

Set an event listener onto a bootstrap popover element

Is there a way to get the actual popover element, in order to set an event listener onto the popover?

For example

 jq("#theElement").popover.on('click', function(){console.log("hello world")});

Upvotes: 1

Views: 988

Answers (1)

Ulad Kasach
Ulad Kasach

Reputation: 12808

You can retrieve the popover element with jq(e.element).data('bs.popover').tip()

jq(e.element).data('bs.popover').tip().on("click",function(){ 
      console.log("hello world");
});

Upvotes: 1

Related Questions