[jQuery] Blur event
[jQuery] Blur event
Code sample:
<span style="font-family: courier new,monospace;">$("input#MyTextInput").blur(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> function() {
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> setTimeout("$('#MyTextInput').focus()",0);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">);</span>
<span style="font-weight: bold; color: rgb(0, 153, 0);">
That works in FF.</span>
----------------------
<span style="font-family: courier new,monospace;">$("input#MyTextInput").blur(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
function() {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
$('#MyTextInput').focus();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
);</span>
<br style="color: rgb(102, 0, 0);"><span style="font-weight: bold; color: rgb(102, 0, 0);">That does not work in FF.</span>
---------------------
Trying to re-focus back on an input after a blur event.
IE works in more circumstances, but FF does not.
Is there an easier way?
Glen