jQuery: Set Mouse Focus On Page Load

First Input:

$(document).ready(function() {
  $('input:text:first').focus();
});

First Empty Input:

$(document).ready(function() {
  $('input:text[value=""]:first').focus();
});


©Jerod Santo. Compiled from source by Jekyll. Original design credited to Jeff Kreeftmeijer.