Demo of tooltip items option selection to DIV or input box





Select one option by using radio buttons. Place your mouse over the input element , it will show the title associated with the selected option. Change your selection and check the tooltip by placing mouse over the input box.

HTML

<div class='col-md-4' title='This is title of DIV element'> 
<input type=text name=t1 id=my_tooltip class='form-control'
 placeholder='Bring Mouse here' title='This is title of INPUT box'></div>

jquery

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