Simple message composer built with jQuery UI

by J. Sheth

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<body>

<input id="tooltip" title="tooltip here" value="place mouse here">

</body>

JavaScript

var html_data = "<b>I am a tooltip</b>";

$( "#tooltip" ).tooltip({
    content: function( response ) {
        $.ajax({ 
        url: "/echo/html/",
        data: {
    			'html': html_data
  			},
        type: "POST"
        })
          .then(function( data ) {
             response( data );
          });
    },
    items: "*"
});