target

Gets the Tooltip current target.

Example

<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) {
        console.log(target.attr("id"));
      }
    });
  });
</script>

Returns

jQuery The target element or null.

In this article
Not finding the help you need?