RadToolTip provides the following client-side events:
-
OnClientBeforeShow - fires before RadToolTip is shown
-
OnClientShow - fires after RadToolTip is shown
-
OnClientBeforeHide - fires before RadToolTip hides
-
OnClientHide - fires after RadToolTip hides
The properties expect the name of a clientside function to be called. When invoked,
two arguments are supplied to the function - the sender[the tooltip itself], and
an events argument.
Using the events argument
set_cancelmethod,
it is possible to cancel two of the client-side events, namely -
OnClientBeforeShow and
OnClientBeforeHide. Here is how:
function
OnClientBeforeShow(sender, eventArgs)
{
LogEvent(eventArgs +
"ToolTip with ID "
+ sender.get_id() +
" will show."
);
eventArgs.set_cancel(!confirm(
'Show tooltip ['
+ sender.get_id() +
']?'
));
}
Hover on the links to trigger the RadToolTip events.