title: Selecting :target on document.ready()
body: <p>The following is a simple test case to demonstrate what I'm trying to do:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function()
  {
      $(":target").css('color', 'red');
  });
  &lt;/script&gt;
  &lt;ul&gt;
      &lt;li id="one"&gt;One&lt;/li&gt;
      &lt;li id="two"&gt;Two&lt;/li&gt;
      &lt;li id="three"&gt;Three&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The idea is to do something through jQuery/Javascript to the targetted item, when something is targetted (for example, test.html#two).</p>
  
  <p>This works as I expect it to in Firefox and IE 10, but not in Chrome, Opera or Safari, which leaves me wondering if this is a bug in some browsers, if what I'm trying to do is somehow wrong, or if I've run afoul of an inadequately precise part of some specification or other.</p>
  
  <p>If I change the jQuery code to do</p>
  
  <pre><code>alert($(":target").length);
  </code></pre>
  
  <p>it becomes apparent that Chrome, Opera and Safari can't find the :target element during document.ready(), but calling the same code later (via console or function attached to a click event) does find the elements.</p>
  
  <p>When should :target become accessible to JS?</p>