Demo of Desable & enable method of tooltip





This method does not accept any arguments.

Click the button to change the method of the tooltip. Check the tooltip by placing the mouse over the input box after changing method by the button.

HTML

<input type=text name=t1 id=my_tooltip class='form-control' 
 placeholder='Bring Mouse here' title='This is title of input box'>

jquery

<script>
$(document).ready(function() {	
/////////
$( "#my_tooltip" ).tooltip({
});
///////
$('#b1').click(function(){
var str=$(this).attr("value");
$( "#my_tooltip" ).tooltip(str);

if(str=='disable'){
$("#b1").prop('value', 'enable');	
$("#b1").html(' Enable ');
$('#b1').removeClass( 'btn btn-danger ').addClass( 'btn btn-success ' );
}
if(str=='enable'){
$("#b1").prop('value', 'disable');	
$("#b1").html('Disable');
$('#b1').removeClass('btn btn-success ').addClass( 'btn btn-danger ' );
}
})
///
})
</script>