closestEnabledButton
JavaScript performance comparison
Info
Changed class-comparison of the closestEnabledButton-method to indexOf.
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div class="ui-btn test">
<div class="ui-list test2 test3">
<div>
<div class="test ui-test test2 test3">
<div>
<div class="test ui-test ui-disabled test2 test3">
<div>
<div class="ui-disabled test2 test3">
<div id="test"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
Benchmark.prototype.setup = function() {
element=$('#test').eq(0)[0];
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
old |
|
pending… |
new |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments