Search code examples
jquerytooltip

TagToTip() in jquery


I need to convert a website which uses TagToTip() of wz_tooltip.js. I tried to find a implementation of this method which uses jquery, but without luck.

TagToTip() ca be used like this:

<span onmouseover="TagToTip('foo-id')">.....</span>
<span id="foo-id" style="display: none">This is the content of the tooltip. 
It can contain any HTML</span>

Does anybody know how I can to this with jquery, or jquery-ui?


Solution

  • Hiya if you are looking for JQuery ui equivalent the check out this implementation:

    demo http://jsfiddle.net/5eKYt/ : with various kind of tooltips. another here: http://jsfiddle.net/8vC2k/

    ui wiki for tooltips: http://wiki.jqueryui.com/w/page/12138112/Tooltip

    few ui demo repos here: http://view.jqueryui.com/master/demos/tooltip/

    Further this will be a good read: JQuery Tools Tooltip VS JQuery UI Tooltip

    If you are not looking for something like this let me know will remove this post, :)

     $(_this).unbind('mouseover').bind('mouseover mouseout', function(e) {
                        e.preventDefault();
                        if (e.type == "mouseover") {
                            timer = setTimeout(function() {
                                createToolTip(_this);
                            }, o.hoverDelay);
                        } else {
                            window.clearTimeout(timer);
                            removeToolTip();
                        }
                    });
                });
            }
        });
    })(jQuery);