Following code should focus the first form element after blurring the last one ,but this is not happening:
<script>
$(document).ready(function(){
$("#last").blur(function(){
$("#first").focus();
});
});
</script>
<form>
<input type="text" name="first" id="first"><br><br>
<input type="text" name="last" id="last">
</form>
If I add another form element after #last, it’s working correctly, see below
<script>
$(document).ready(function(){
$("#last").blur(function(){
$("#first").focus();
});
});
</script>
<form>
<input type="text" name="first" id="first"><br><br>
<input type="text" name="last" id="last">
<input type="text" name="dummy">
</form>
Here is a fix for you, it’s working here: