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

tooltip positioning / placement #6832

Closed
Yohn opened this issue Feb 8, 2013 · 13 comments
Closed

tooltip positioning / placement #6832

Yohn opened this issue Feb 8, 2013 · 13 comments
Labels
Milestone

Comments

@Yohn
Copy link
Contributor

Yohn commented Feb 8, 2013

congrats on releasing 2.3.0!
I was checking out some of the docs and saw that tooltips data-placement is not working correctly. I think its because of the one pull request that makes options set in javascript override the options that were set in the html but I'm not sure..

@Yohn
Copy link
Contributor Author

Yohn commented Feb 8, 2013

commit that I believe started this = 1fe4ed8 as @gsmet pointed out in #6737

@Nek-
Copy link

Nek- commented Feb 8, 2013

I'm not sure, but I tried to set tooltips as simply as possible on my code:

<a href="#" data-toggle="tooltip" title="first tooltip">hover over me</a>

But it doesn't work.

[EDIT] SORRY. Didn't saw "For performance reasons, the tooltip and popover data-apis are opt in, meaning you must initialize them yourself."

@Merg1255
Copy link

good call for this.

@WilliamStam
Copy link

theres another issue with tooltips where it calls the modals "hide" busy making a test case for it at the mo :P but the direction thing is a bit of an issue aswell...

@cvrebert
Copy link
Collaborator

@WilliamStam: erm, you mean #6942?

@WilliamStam
Copy link

o sweet.. thanks.. i did a quick look through open issues and didnt see it

blind

thanks for that

does BS have tests? seems every version they break tooltips

@cvrebert
Copy link
Collaborator

@WilliamStam: Yes; browse the damn source tree: bootstrap/tree/master/js/tests. No idea how thorough they are though.

@inDream
Copy link

inDream commented Feb 22, 2013

I think the bug found in document is due to 'selector' option.
If used this option, you need to set data-placement in the element which you called $().tooltip()

Demo: http://jsfiddle.net/indream/xFC7G/

@shails
Copy link

shails commented Feb 22, 2013

Just use the following code in javascript section of your page :-
$('a').tooltip();
and it should start working .
Also they have mentioned on the Tooltip section as "For performance reasons, the tooltip and popover data-apis are opt in, meaning you must initialize them yourself."
Jsfiddle for you jsfiddle.net/shail/vSTLU/2/show

@BenMorel
Copy link

Yes, but the documentation page is still broken!

tooltip

@inDream
Copy link

inDream commented Feb 22, 2013

@BenMorel If you destroy the tooltips in container with $('.tooltip-demo').tooltip('destroy') then create it with $('a[data-toggle="tooltip"]').tooltip() would make it work.

As I mentioned before, it's due to options are only considered for target element when tooltips initialized.
It caused this bug if you used 'selector' option.

@BenMorel
Copy link

@inDream Yes, but it would be nice to push a change to the doc :-)

@fat
Copy link
Member

fat commented Mar 1, 2013

fixed in 2.3.1

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 a pull request may close this issue.

9 participants