For anyone that's interested. The answer is as follows.
To set the focus BACK to the originating form element on a Blur event, you must wait for that event to complete. Calling event.stopPropagation() or event.preventDefault() will not stop the blur event.
In order to wait for it to complete you must use a timer. Below is an example of working code.
- jQuery( function($){
$(document).ready( function(){
$("#Transit_Number").blur( function(e){
if ( $(this).val().length != 5 ){
alert('Transit Number Must be 5 digits long');
setTimeout(function() { $("#Transit_Number").focus(); }, 50);
}
}); - });
});