title: In jQuery, how can I select a hidden element?
body: <p>How can I select the <code>&lt;span&gt;</code> where <code>display</code> is set to <code>none</code> in the below code?</p>
  
  <pre><code>&lt;p id="p1"&gt;
  &lt;span id="test1" style="display:none"&gt;test1&lt;/span&gt; 
  &lt;span id="test2" &gt;test2&lt;/span&gt; 
  &lt;/p&gt;
  </code></pre>
  
  <p>I can select the <code>&lt;span&gt;</code> whose ID is "test1" by using <code>$("span[id='test1']")</code>, but it does not work when I use <code>$("span[style='display:none']")</code>.</p>
  
  <p>Is there any method to get this element at a time?</p>
  
  <p>Thanks a lot.</p>