JavaScript Tooltip

Invoke the destroy method of the jqxTooltip. Author: http://jqwidgets.com

by mark edwards

HTML

<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<input type="button" style="margin: 10px; margin-top: 50px;" class='destroy' id="jqxbutton" value="Hover over me to see the tooltip" />
<input type="button" style="margin: 10px;" id="jqxbutton2" value="Destroy the tooltip of the first button" />

JavaScript

$("#jqxbutton").jqxButton({
      width: 300,
      height: 30,
      theme: 'energyblue'
  });
  $("#jqxbutton").jqxTooltip({
      position: 'top',
      theme: 'energyblue',
      content: 'This is a jqxButton.',
      width: 200,
      height: 30,
      autoHide: false
  });
  $("#jqxbutton2").jqxButton({
      width: 300,
      height: 30,
      theme: 'energyblue'
  });
  $('#jqxbutton2').click(function () {
      $('.destroy').jqxTooltip('destroy');
  });