jQuery#ready() (v4)

Revision 4 of this benchmark created on


Description

http://api.jquery.com/ready/

In addition to what’s being tested here, there’s $.ready too, but that one doesn’t actually do anything with functions, so it’s not a proper replacement for $(document).ready().

Preparation HTML

<script src="http://code.jquery.com/jquery-1.7.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
$(document).ready(fn)
$(document).ready(function() {
  // some code
});
ready
$().ready(fn)
$().ready(function() {
  // some code
});
ready
$(fn)
$(function() {
  // some code
});
ready
$.fn.ready(fn)
$.fn.ready(function() {
  // some code
});
ready

Revisions

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