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
  • #4215
Closed
Open
Issue created Jul 29, 2012 by Administrator@rootContributor

Popover/tooltip selector option needs documentation

Created by: jakepetroules

The documentation for the selector option for popovers and tooltips currently states "if a selector is provided, tooltip objects will be delegated to the specified targets". This description is not very helpful and appears to confuse a good number of people, including myself until I figured out what it actually does (also see #2091 (closed)).

Explanation: 'selector' is used internally in conjunction with jQuery.on in order to allow markup dynamically inserted in the DOM, to trigger tooltips and popovers. I've created an interactive jsFiddle illustrating its usage: http://jsfiddle.net/KPeKS/4/

tl;dr: selector = jQuery.on support

I therefore propose that the documentation be improved, making note that 'selector' makes the plugins use jQuery.on and a short explanation of what that does, for those who may not be familiar with the function, along with the following sample code:

$('body').tooltip({
    selector: '[rel="tooltip"]'
});

$('body').popover({
    selector: '[rel="popover"]'
});

I'll leave exactly how it might be worded to @mdo / @fat.

Assignee
Assign to
Time tracking