jQuery selector in different browsers

JavaScript performance comparison

Revision 3 of this test case created

Info

try to test jQuery selector by ID in different browsers, mostly mobile

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="head">
  <div id="menu">
    111
  </div>
  <div id="command-line">
    111
  </div>
</div>

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
jQuery selector
$('#command-line');
pending…
selector with is Hidden
$('#command-line').is(':hidden');
pending…
getElementById();
$(document.getElementById('command-line'));
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