Check if div exists (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div class="a"></div>

Setup

var a = $('.a');

Test runner

Ready to run.

Testing in
TestOps/sec
Property Lookup
a[0]
ready
.length
a.length
ready
.size()
a.size()
ready
.is:visible
a.is(':visible')
ready
.length > 0
a.length > 0
ready

Revisions

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