Demo of Selection of track option for tooltip in JQuery UI




Select above radio buttons to apply different track options ( True or False ) to tooltip, then move the mouse over input box to see how the tooltip is following the mouse ( with option True )

jquery

<script>
$(document).ready(function() {
////////////////
$( "#my_tooltip" ).tooltip({
track: false
});
///////////////
var present_class = $( "#my_tooltip" ).tooltip( "option", "track" );
$('#d1').html( " <b>Status of track:</b> " + present_class );
//////////
$("input:radio[name=r1]").click(function() {
var sel = ($(this).val() == 'true');
$( "#my_tooltip" ).tooltip( "option", "track", sel );
var present_class = $( "#my_tooltip" ).tooltip( "option", "track" );
$('#d1').html( " <b>Status of track:</b> " + present_class );
})
////////////
})
</script>