tooltip jQuery Plugin

This simple plug in provides tooltip functionality on the selected elements. By default the tooltip display is a small yellow window much like the stock tooltip, but that can be activated through code.

Highly useful for 'working' operators while loading data from the server via AJAX callbacks for example.

$.fn.tooltip = function(msg, timeout, options)

msg
The message to be displayed. Can be text or html which is determined by the isHtml option.

timeout
The timeout before the tooltip is hidden. 0 means don't hide (ie. manual removal).

options
The default options that can be passed are defined as follows:

var opt = { cssClass: "",
        isHtml: false,
        shadowOffset: 2,
        onRelease: null
};

The onRelease event handler is fired only if a timeout is set and is made in the context of the element. It receives an instance of the _ToolTip class.

Simple Example:

$("#txtName").tooltip("updating...");
... do something or async code
$("#txtName").tooltip("hide");

onRelease Example:

$("#txtName")
    .tooltip("updating...",5000, 
               { onRelease: function(tt) { 
                    alert('tooltip is closing on element: ' + this.id);
                 }  });

Remarks

This class has no dependencies on server side features.

Class Members

See also:

Class wwToolTip

© West Wind Technologies, 1996-2018 • Updated: 09/27/12
Comment or report problem with topic