Test name | Executions per second |
---|---|
jQuery 3.6.0 | 250734.2 Ops/sec |
jQuery 3.2.1 | 266791.2 Ops/sec |
<script src='https://code.jquery.com/jquery-3.6.0.js'></script>
<script type="text/javascript">
var jq331 = $.noConflict(true);
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js'></script>
<script type="text/javascript">
var jq214 = $.noConflict(true);
</script>
<div id="testElement"></div>
var element = jq331('#testElement');
element.removeClass('test-class');
element.addClass('test-class');
element.removeClass('test-class');
var element = jq214('#testElement');
element.removeClass('test-class');
element.addClass('test-class');
element.removeClass('test-class');