hasClass (jquery) vs hasClass (mjlib) (v2)

Revision 2 of this benchmark created by David Mark on


Preparation HTML

<script src="//www.cinsoft.net/mylib099-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="http://michal.jezile.net/kitty/lib/mjlib/mjlib.min.js">
</script>
<span id='testSpan' class="c"></span>
<script>
  var testSpan = document.getElementById('testSpan');
  var testSpanQ = $('#testSpan');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery
testSpanQ.hasClass('c');
ready
mjlib
MJ.hasClass(testSpan, 'c');
ready

Revisions

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

  • Revision 1: published on
  • Revision 2: published by David Mark on
  • Revision 3: published by David Mark on