What is faster to find in jQuery - ID's that start with X or a class? : <p>If you have html and throughout you have span elements like this:</p>

<pre><code>&lt;span id="element-1" class="elements"&gt;&lt;/span&gt;
&lt;span id="element-2" class="elements"&gt;&lt;/span&gt;
&lt;span id="element-3" class="elements"&gt;&lt;/span&gt;
</code></pre>

<p>What is faster to find them:</p>

<pre><code>$('.elements')
</code></pre>

<p>or</p>

<pre><code>$('[id^="element-"]')
</code></pre>
