Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #12320
Closed
Open
Issue created Jan 21, 2014 by Administrator@rootContributor

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

Assignee
Assign to
Time tracking