Heres an actual Bootstrap trick: Display placeholder text as tooltip content for focused, non-empty form inputs.<p>Have you ever entered information into a form that used placeholder text to tell you what to write, and you already started typing so that text disappeared but forget what you're supposed to be writing? The only way to view that placeholder text is by clearing the input field, right? Well if you have Bootstrap included already we can do some magic!<p><pre><code> // Display placeholder="" text as tooltip for :focused, non-empty inputs
$('form input').blur(function() {
var inputVal = $(this).val(),
titleText = $(this).attr('placeholder');
if ( inputVal != '' ) {
$(this).tooltip({
title: titleText,
trigger: 'focus',
container: 'form'
});
}
});</code></pre>