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
  • Merge requests
  • !23874

Include option to add class to tooltips and popovers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/mattcheah/add-class-to-tooltip into v4-dev Sep 07, 2017
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 1

Created by: mattcheah

added feature as a response to https://github.com/twbs/bootstrap/issues/19415 in which people (myself included) wanted a way to add a class to a popover or group of popovers for easier styling.

I added a default class key for config and added the class to the $(tip) element if the class value was present.

So when you create a tooltip (or popover) the class you added in your options will be there, like so:

<a id="popover1" data-toggle="popover" title="popover 1" data-content="This is my content" data-class="fhqwhgads">Popover 1</a>
<a href="#" id="tooltip1" data-toggle="tooltip" title="Some tooltip text!">Tooltip 1</a>
$("#popover1").popover()
$("#tooltip1").tooltip({class:"fhqwhgads"})

The class will be added to the element. add class to tooltips

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mattcheah/add-class-to-tooltip