It looks like you need to use setTimeout according to this question . Since you immediately focus on the element, you need to consider some time when the element first goes out of focus.
$("#inputBoxId").blur(function() { if ($(this).val() < 10) { setTimeout(function() { $("#inputBoxId").focus(); }, 100); } });
An example of working on jsfiddle , tested on the chrome dev, firefox and IE8 channel.
Mark coleman
source share