JSFiddle - React, Tailwind, and code Playground

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<input id="hour" type="text" class="other" autocomplete="off" value="hour" title="hour" />
<input id="hour" type="text" class="other" autocomplete="off" value="minutes" title="minutes" />

JavaScript

function beforemouseout() {
  if ($(this).val() == '') {
    $(this).val($(this).attr('title'));
  }
}
$(".other").click(function() {
  $(this).val('').mouseout(function() {
    setTimeout($.proxy(beforemouseout, this), 3000);
  });
});