Link to home
Start Free TrialLog in
Avatar of Fezi
FeziFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Jquery TipTip tooltip to show div on tooltip

Hi Experts,

I need some help with this TipTip Tooltip I'm working with, the tooltip can be seen from it's author's website, http://code.drewwilson.com/entry/tiptip-jquery-plugin 

I want to display a div which is hidden on the page (display:none), and to show up in the tooltip only. Any idea's how I can do this?

Any help, well appreciated, thanks.

Regards,
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

basically you need to show that div right below your mouse pointer, when you do mouse over to show a tooltip for an element.
ASKER CERTIFIED SOLUTION
Avatar of Eyal
Eyal
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you tried doing code below?

     $("#tiptip_content").append();

so let's say you have a div with id MyDiv that is hidden

       <div id="MyDiv">this my div I want injected.</div>

which you want to add inside the tiptip_content, you can use the content property of tiptip:

$(function(){
                  var myDivChildren = $("#MyDiv").html();
                  $(".someClass").tipTip({maxWidth: "auto", edgeOffset: 10, content: myDivChildren}).removeAttr("title");
            });

note that I had to remove the title attribute because for some weird reason when you use the content property, the title attribute is note removed resulting to the browser tool tip to show as well.