enyo / opentip

Opentip is an open source javascript tooltip based on the protoype framework.
http://www.opentip.org
1.25k stars 401 forks source link

HTML element inside tooltips? #43

Closed jch02140 closed 11 years ago

jch02140 commented 11 years ago

Is it possible to show any HTML elements like links, forms, videos, images in the tooltips area?

enyo commented 11 years ago

Yes. Just put it in there. You can also provide a function as content that will be executed and where you could create the HTML elements or just the content of another hidden div.

kevincberry commented 10 years ago

I'm trying to place a link in the tooltip but not having any success. When I specify an hreft value it seems to be breaking the javascript. I'm new to javascript but any suggestions on how ot properly format the sample code below would be appreciated.

var opentip_upcoming_events = new Opentip("#upcoming_events", "Line 1<br>2nd line<br><a href="http://link.com">link.com</a>, "", { style: "tooltip_style" })