\Kendo\UI\Tooltip
A PHP wrapper for Kendo UI Tooltip.
Inherits from \Kendo\UI\Widget.
Usage
To use Tooltip in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo Tooltip
<?php
// Create a new instance of Tooltip and specify its id
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
// Configure it
$tooltip->animation(true)
// Output it
echo $tooltip->render();
?>
Methods
animation
A collection of {Animation} objects which are used to change the default animations. If set to false, all widget animations will be disabled. animation:true is not a valid configuration.
Returns
\Kendo\UI\Tooltip
Parameters
$value boolean|\Kendo\UI\TooltipAnimation|array
Example - using boolean
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->animation(true);
?>
Example - using \Kendo\UI\TooltipAnimation
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$animation = new \Kendo\UI\TooltipAnimation();
$close = new \Kendo\UI\TooltipAnimationClose();
$animation->close($close);
$tooltip->animation($animation);
?>
Example - using array
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$close = new \Kendo\UI\TooltipAnimationClose();
$tooltip->animation(array('close' => $close));
?>
autoHide
Specifies if the Tooltip will be hidden when the mouse leaves the target element. If set to false, a Close button will be shown within Tooltip. If set to false, showAfter is specified, and showOn is set to mouseenter, the Tooltip will be displayed after the given timeout even if the element is no longer hovered.
Returns
\Kendo\UI\Tooltip
Parameters
$value boolean
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->autoHide(true);
?>
callout
Specifies if the Tooltip callout will be displayed.
Returns
\Kendo\UI\Tooltip
Parameters
$value boolean
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->callout(true);
?>
content
Sets the HTML content of the Tooltip.
Returns
Tooltip
$value string
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->content('<strong>Content</strong>');
?>
contentLoad
Fires when an AJAX request for the content completes. For additional information check the contentLoad event documentation.
Returns
\Kendo\UI\Tooltip
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->contentLoad('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onContentLoad(e) {
// handle the contentLoad event.
}
</script>
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->contentLoad('onContentLoad');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->contentLoad(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
endContent
Stops output bufferring and sets the preceding markup as the content of the Tooltip.
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->startContent();
?>
<strong>Content</strong>
<?php
$tooltip->endContent(); // content is set to <strong>Content</strong>
?>
error
Fires when an AJAX request for content fails. For additional information check the error event documentation.
Returns
\Kendo\UI\Tooltip
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->error('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onError(e) {
// handle the error event.
}
</script>
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->error('onError');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->error(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
filter
Specifies a selector for the elements within the container which will display the Tooltip.
Returns
\Kendo\UI\Tooltip
Parameters
$value string
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->filter('value');
?>
height
The height (in pixels) of the Tooltip.
Returns
\Kendo\UI\Tooltip
Parameters
$value float
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->height(1);
?>
hide
Fires when a Tooltip is hidden. For additional information check the hide event documentation.
Returns
\Kendo\UI\Tooltip
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->hide('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onHide(e) {
// handle the hide event.
}
</script>
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->hide('onHide');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->hide(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
hideAfter
Specifies the delay (in milliseconds) before the Tooltip is hidden.
Returns
\Kendo\UI\Tooltip
Parameters
$value float
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->hideAfter(1);
?>
iframe
Explicitly states whether a content iframe will be created.
Returns
\Kendo\UI\Tooltip
Parameters
$value boolean
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->iframe(true);
?>
offset
Specifies the offset (in pixels) between the Tooltip and the anchor. If the callout property is set to true, the offset is rendered from the callout arrow. If the callout property is set to false, the offset is rendered from the content of the Tooltip.
Returns
\Kendo\UI\Tooltip
Parameters
$value float
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->offset(1);
?>
position
The position that is relative to the target element at which the Tooltip will be shown.The supported values are: bottom; top; left; right or center.
Returns
\Kendo\UI\Tooltip
Parameters
$value string
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->position('value');
?>
requestStart
Fires before an AJAX request starts. Note that this event is triggered only when an AJAX request is used instead of an iframe. For additional information check the requestStart event documentation.
Returns
\Kendo\UI\Tooltip
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->requestStart('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onRequestStart(e) {
// handle the requestStart event.
}
</script>
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->requestStart('onRequestStart');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->requestStart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
show
Fires when a Tooltip is shown. For additional information check the show event documentation.
Returns
\Kendo\UI\Tooltip
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->show('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onShow(e) {
// handle the show event.
}
</script>
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->show('onShow');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->show(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
showAfter
Specifies the delay (in milliseconds) before the Tooltip shows. This option is ignored if showOn is set to click or focus.
Returns
\Kendo\UI\Tooltip
Parameters
$value float
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->showAfter(1);
?>
showOn
The event on which the Tooltip will be shown.The supported values are: mouseenter; click or focus.
Returns
\Kendo\UI\Tooltip
Parameters
$value string
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->showOn('value');
?>
startContent
Starts output bufferring. Any following markup will be set as the content of the Tooltip.
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->startContent();
?>
<strong>Content</strong>
<?php
$tooltip->endContent(); // content is set to <strong>Content</strong>
?>
width
The width (in pixels) of the Tooltip.
Returns
\Kendo\UI\Tooltip
Parameters
$value float
Example
<?php
$tooltip = new \Kendo\UI\Tooltip('Tooltip');
$tooltip->width(1);
?>