id vs class vs

JavaScript performance comparison

Revision 141 of this test case created

Preparation code

<div id="zakladki">   
      <ul>
        <li class="active"><a onclick="_gaq.push(['_trackEvent', 'UI: Produkt','Zakladki','Opis']);" href="" class="">Opis produktu</a></li>

                  <li><a onclick="_gaq.push(['_trackEvent', 'UI: Produkt','Zakladki','Gwarancja']);" class="zakladka-gwarancja" href="">Gwarancja</a></li>    
               
                  <li><a onclick="_gaq.push(['_trackEvent', 'UI: Produkt','Zakladki','Opinie']);" class="zakladka-opinie" href="">Opinie klientów (2)</a></li>
       </ul>

    </div>


<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1
$("#zakladki a");
pending…
2
$("#zakladki").find("a");
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment