JavaScript Tooltip

Invoke the open 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;" id="jqxbutton" value="Hover over me to see the tooltip" />
<input type="button" style="margin: 10px;" id="jqxbutton2" value="Open the tooltip of the first button" />

JavaScript

$("#jqxbutton").jqxButton({
      width: 300,
      height: 30,
      theme: 'energyblue'
  });

  $("#jqxbutton").jqxTooltip({
      position: 'bottom-right',
      theme: 'energyblue',
      content: '<h1>heading</h1>This is a <br />jqxButton. <br /><strong>new bold line </strong>',
      width: 200,
      height: 30
  });
  $("#jqxbutton2").jqxButton({
      width: 300,
      height: 30,
      theme: 'energyblue'
  });
  $('#jqxbutton2').click(function () {
     $("#jqxbutton").jqxTooltip('content', 'SHIT');
      $('#jqxbutton').jqxTooltip('open');
  });