Element traversing nextAll with obstacles

Benchmark created by Orkel on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script>
  var $current = jQuery.noConflict();
</script>
<script src="https://docs.google.com/uc?id=0B6yiDAQGhvdFZWVkNjcxZDctOWYwYS00NzdjLWFkMDUtZmM0Yjg2OTYyZjhh&export=download&hl=ru">
</script>
<script>
  var $test = jQuery.noConflict();
</script>

<div class="parent">
  <div>
    test
  </div>
  
  <!--test -->
  <![CDATA[test]]>
  test
  
  <div>
    test
  </div>
  
  <!--test -->
  <![CDATA[test]]>
  test
  
  <div id="median">
    test
  </div>
  
  <!--test -->
  <![CDATA[test]]>
  test
  
  <div>
    test
  </div>
  
  <!--test -->
  <![CDATA[test]]>
  test
  
  <div>
    test
  </div>
  
  <!--test -->
  <![CDATA[test]]>
  test
  
</div>

<script>
  var currentFirst = $current( ".parent div:first" ),
  testFirst = $test( ".parent div:first" );
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
current nextAll
currentFirst.nextAll();
ready
text nextAll
testFirst.nextAll();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Orkel on