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

Adding SVG Support #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding SVG Support #19

wants to merge 1 commit into from

Conversation

sDaniel
Copy link

@sDaniel sDaniel commented Jan 23, 2014

When using jquery.tiptip on SVG elements in Chrome, the tooltip appears in the top-left corner of the element instead of in the middle. In Firefox, the tooltip appears at the top of the page, nowhere near the element in question. This is caused because the jQuery method outerWidth() doesn't work with SVG. This patch uses getBoundingClientRect instead. Couldn't find any issues with normal links with a quick test.

'Some more infos on getBoundingClientRect'
Browser support: https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect
getBoundingClientRect is Awesome: http://ejohn.org/blog/getboundingclientrect-is-awesome/

@danimesq
Copy link

Hi, @sDaniel
I've forked TipTip to maintain it and use in all web projects of my community.
Please clone your pull request to: https://github.com/Software-js/TipTip
Thanks!

@danimesq
Copy link

Merge in: Floflis#11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants