Check hidden (v25)

Revision 25 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div>
    <div id="test">Hello there</div>
</div>

Setup

var el = document.getElementById("test");
    var elJQ = $('#test');

Test runner

Ready to run.

Testing in
TestOps/sec
el.offsetParent
var x = el.offsetParent;
ready
ComputedStyle
var x = window.getComputedStyle(el).display;
ready
el.offsetHeight
var x = el.offsetHeight;
ready
el.css
var x = elJQ.css('display');
ready
el.is(':visible')
var x = elJQ.is(':visible');
ready
el.style.display
var x = el.style.display;
ready

Revisions

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