Add data reference to the trigger element of tooltip/popover
Created by: JasonAllenCorns
Consider the task of determining which element triggered the visible popover(s).
Rather than keeping a local cache of clicked-triggers or querying the entire DOM for an element whose data attributes point to a popover that also happens to be open,
could something like the following suffice:
$('div.popover.fade.right.in').data('bs.popover.trigger');
Note: the reverse is already true:
$('a.btn.btn-lg.btn-danger').data('bs.popover')
supplies the popover instance
Also note: the trigger is not alway the 'previous' element, as coded here: https://github.com/twbs/bootstrap/blob/master/js/tooltip.js#L153