drewwilson / TipTip

Intelligent ToolTip jQuery Plugin
http://code.drewwilson.com/entry/tiptip-jquery-plugin
124 stars 70 forks source link

Adding SVG Support #19

Open sDaniel opened 10 years ago

sDaniel commented 10 years ago

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 commented 8 years ago

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 commented 6 years ago

Merge in: https://github.com/ScreensOS/TipTip/pull/11.