SO - 20795741
by Arun P Johny
HTML
<input type="text" placeholder="First" id="first" name="first" required />
<input type="text" placeholder="Last" id="last" name="last" required />
<p id="nameTxt" style="display: none">Blah blah blah</p>
<input />
JavaScript
var $nt = $("#nameTxt");
$('#first, #last').focus(function () {
clearTimeout($nt.data('nttimer'))
$("#nameTxt").stop(true, true).show(300);
});
$('#first, #last').blur(function () {
var timer = setTimeout(function () {
$("#nameTxt").stop(true, true).hide(150);
}, 200);
$nt.data('nttimer', timer);
});