Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applies data attributes to selector tooltips, fixes #6832 #6869

Closed
wants to merge 2 commits into from

Conversation

kasperp
Copy link
Contributor

@kasperp kasperp commented Feb 9, 2013

This commit fixes #6832, by applying options provided in data attributes before showing and hiding tooltips with a selector.

In the doc there is something like this:

<div class="bs-docs-example tooltip-demo">
  <ul class="bs-docs-tooltip-examples">
    <li><a href="#" data-toggle="tooltip" data-placement="top" title="" data-original-title="Tooltip on top">Tooltip on top</a></li>
    <li><a href="#" data-toggle="tooltip" data-placement="right" title="" data-original-title="Tooltip on right">Tooltip on right</a></li>
    <li><a href="#" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Tooltip on bottom">Tooltip on bottom</a></li>
    <li><a href="#" data-toggle="tooltip" data-placement="left" title="" data-original-title="Tooltip on left">Tooltip on left</a></li>
  </ul>
</div>

The tooltip plugin are then attached like so:

$('.tooltip-demo').tooltip({
  selector: "a[data-toggle=tooltip]"
})

Without applying the data attribute options, only the options in given to to the tooltip( .. ) are used and all the delegated tooltips use the default placement (as well as other defaults).

I don't know if this is something you want to support, alternatively docs could be updated to attach the tooltips differently.

@fat
Copy link
Member

fat commented Mar 1, 2013

don't quite want to do this - thanks tho! - fixed in 2.3.1

@fat fat closed this Mar 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tooltip positioning / placement
2 participants