Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JQuery: selector for find by class
(version: 0)
Test different approach for found by class
Comparing performance of:
$("#main").find(".innerTest") vs $(".innerTest") vs $("#main").children(".innerTest")
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<div class="test" id="main"> <div class="innerTest"></div> <div class="innerTest"></div> <div class="innerTest"></div> </div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Tests:
$("#main").find(".innerTest")
$("#main").find(".innerTest");
$(".innerTest")
$(".innerTest");
$("#main").children(".innerTest")
$("#main").children(".innerTest");
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
$("#main").find(".innerTest")
$(".innerTest")
$("#main").children(".innerTest")
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
jQuery Selector
jQuery Selector #2
find vs. direct selection
JQuery: find by class vs find by tag vs children
Comments
Confirm delete:
Do you really want to delete benchmark?