I'd like to modify some parts of my website to show popups when a user clicks on some <td>
elements. I'd like to keep the modification very simple, which is w开发者_运维百科hy I considered using a JavaScript framework. It does not really matter which, but I'd like to be able to include html in the tooltip's text.
What's the easiest way to achieve this? Could you maybe give an example?
qTip, a jQuery plugin, works very well for creating tooltips. It also supports HTML markup inside the tips. To have the tooltip show when clicking the element, rather than on mouseover, you can use the 'show' option:
jQuery('.selector').qtip({show: 'click'});
精彩评论