title: First jQuery script, simple Form Focus, any problems?
body: <p>After studying the <a href="http://docs.jquery.com/Main_Page" rel="nofollow noreferrer">docs</a> for a while, I came up with my first jQuery script. It's a simple Form Focus script. Just want to make sure I've got this right.</p>
  
  <p>I couldn't find anything that spoke of "conditional statements" with jQuery, so I assume you just use standard JavaScript <code>if</code> / <code>else if</code> statments.</p>
  
  <p>To test if the <code>#id</code> exists, the jQuery docs explained I should use <code>.length</code>.</p>
  
  <pre><code>$(document).ready( function() {
      if ($('#one').length) {
          $('#one').focus();
      }
      else if ($('#two').length ) {
          $('#two').focus();
      }
      else {
          return false; // is this even necessary?
      }
  });
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>It is possible that <code>#one</code> and <code>#two</code> will exist on the same page, so I want to target <code>#one</code> first.</p>