Forum:Tooltip help

I've been wanting to make tooltips for Wakfu wiki for a while, and I finally took the time to do it.

I've searched the forums and found this topic: Wowwiki tooltips code

I copied the basic codes and included it on a template I already had on the wiki: Css Js Page template Tooltip template Page with the tooltip (I've just used it on "Ruby" for testing, its one of the first links)

However, it's not working. It just shows it as a normal link. I've checked the codes of the wiki of the person who asked on that topic, and from what I saw, everything is the same on mine (the needed basics anyways).

Anyone know what could be causing it not to work?

Or, if that's easier, how do you load parts of a template according to its page inside another template? I could use an existing tooltip (the first tooltip section of the css) to make it, instead, if I knew how to do that. Would it be possible within a dpl? Or is there something else that allows you to do it? Yechnagoth 10:37, January 15, 2012 (UTC)


 * At one point I also wanted to play around with these tooltips and have also found the existing guides, including the one you linked, insufficient. Once I finally made the tooltips work, the delay before the tooltip had shown up, was too big. With the help another user, I managed to optimize the tooltip and reduce the delay. I can't offer you a fix, but if you're up to it, you can copy the code I have on my test wiki and replace the one you have on yours. The code:
 * JS
 * CSS
 * Working example
 * The working example page also has a lightweight, CSS-only tooltip, for which the code can be found here - it has some advantages over the Ajax tooltips and if you're not planning on displaying any complex content, it might be more appropriate. Also, disregard all the weird stuff going on on the wiki ;). — Sovq 12:24, January 15, 2012 (UTC)


 * The css only tooltip is also in use in my wiki, but it would be to take other pages really, not anything else, and I have no idea how you'd do that within a template instead of js. Isn't there any way to take the info of a template contained in a page and make it go somewhere (just like dpl tables do, but it wouldn't be a table)? If so, I'd really prefer css.


 * I'm going to test the js example you gave me. I'll report the results later.
 * Update: It is working now, though it does take a while to load. Still, better than no tooltips. You can still just go to the page directly if you don't like the loading time. Thanks once again, Sovq! :)
 * Yechnagoth 13:25, January 15, 2012 (UTC)


 * I have a question: can the code be modified so then you can add the class "ajaxttlink" in an span, div (or table row) which contain the link? Example:

Link

Link 1, Link 2

And another question: if I add the class "tooltip-content" to a wikitable (like an infobox) will it work or do I have necessary wrap the infobox in the div? Because I think using the div creates problem with the floating...

About one of your questions, Leviathan, I think you could just wrap the entire table inside the div. I have many templates with tables inside divs and never had a problem. Yechnagoth 15:37, January 17, 2012 (UTC)


 * I did and it works, the table is oddly shown, maybe due the css float attribute.


 * Could you link it? From what I've used, the table is never touched by any of the div attributes.
 * Yechnagoth 15:59, January 17, 2012 (UTC)