jQuery 1.x vs 2.x (v7)

Revision 7 of this benchmark created by Rick Waldron on


Preparation HTML

<script src="//code.jquery.com/jquery-git1.js">
</script>
<script>
  jQ1 = jQuery.noConflict();
</script>
<script src="//code.jquery.com/jquery-git2.js">
</script>
<script>
  jQ2 = jQuery.noConflict();
</script>
<div id="idSelector" style='display:none;'>
  <div class="classSelector">
    <div id="find">
      <div id="cssGetter" style="color: black;">
        <div id="cssSetter" style="color: black;">
          <ul id="iteration">
            <li>
              <div id='editablearea'>
              </div>
            </li>
            <li>
              <p>
            </li>
            <li>
              <input type="checkbox">
            </li>
            <li>
              <h>
              </h>
            </li>
            <li>
              <table>
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </li>
            <li>
              <textarea>
              </textarea>
            </li>
            <li>
              <span>
              </span>
            </li>
          </ul>
        </div>
      </div>
      <div>
      </div>
    </div>
  </div>
</div>

Setup

function testcase(_$) {
      _$(".classSelector").data('ts', '3');
    };

Test runner

Ready to run.

Testing in
TestOps/sec
1.x
testcase(jQ1);
ready
2.x
testcase(jQ2);
ready

Revisions

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