1

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")});
Ulad Kasach
  • 11,558
  • 11
  • 61
  • 87
  • Perhaps this will be of some help to you: http://stackoverflow.com/questions/13205103/attach-event-handler-to-button-in-twitter-bootstrap-popover - It uses event delegation to attach an event to the popover's parent, which is triggered by a button inside the popover. – Tyler Roper Apr 18 '17 at 20:44
  • @Santi Unfortunately i'm required to set `container:'body'` which results in the `.parent()` element not actually being a parent of the `popover` element. – Ulad Kasach Apr 18 '17 at 20:54

1 Answers1

1

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");
});
Ulad Kasach
  • 11,558
  • 11
  • 61
  • 87