target

Gets the current target of the Tooltip.

Example - getting the current target of the tooltip

<div id="container">
  <span id="target1" title="Tooltip1 content">Tooltip target1</span> <br />
  <span id="target2" title="Tooltip2 content">Tooltip target2</span>
</div>

<button id="targetButton" class="k-button">Log target</button>

<script>
  $(document).ready(function() {

    var tooltip = $("#container").kendoTooltip({
      filter: "span",
      autoHide: false,
      position: "right"
    }).data("kendoTooltip");


    $("#targetButton").click(function() {
      var target = tooltip.target();
      if (target) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log(target.attr("id"));
      }
    });
  });
</script>

Returns

jQuery - The target element or null.

In this article