title: Setting the focus to the next input in jQuery?
body: <p>I've currently got a script that'll check for the value of a select box, and then enable a text field right next to it, and then hopefully set focus.</p>
  
  <p>I have this at the moment which works fine at enabling the input field...</p>
  
  <pre><code>$("#assessed select").change(function () {
  
      if($(this).val() == 'null') { $(this).next('input').attr("disabled", true);  }
      else { $(this).next('input').removeAttr("disabled"); }
  
  });
  </code></pre>
  
  <p>I'm a bit stuck on the 'focus' bit to be honest, I tried "$(this).next('input').focus();" but that didn't focus at all, although it didn't bring up a Javascript error either...</p>
  
  <pre><code>$("#assessed select").change(function () {
  
      if($(this).val() == 'null') { $(this).next('input').attr("disabled", true); $(this).next('input').focus(); }
      else { $(this).next('input').removeAttr("disabled"); }
  
  });
  </code></pre>
  
  <p>Any ideas please guys? I'm really stuck on this and it'd be a very simple, but very useful addition to the page I'm building!</p>
  
  <p>Thanks</p>