jquery height

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div style="height:500px" id="myID">
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery height
$(function() {
  $('#myID').height();
  $('#myID').width();
});
ready
Native
$(function() {
var x = document.getElementById('myID').offsetWidth;
var y = document.getElementById('myID').offsetHeight; }); 
ready

Revisions

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