jQuery prop('disabled') vs. is(':disabled') (v72)

Revision 72 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<input type="checkbox" value="y" name="my-test-checkbox" id="my-test-checkbox" checked>
<script>
  var $el = $('#my-test-checkbox');
  var el = document.getElementById("my-test-checkbox");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
.prop()
$el.prop("disabled");
ready
.is(":disabled")
$el.is(":disabled");
ready
attr()
$el.attr("disabled");
ready
.disabled
$el[0].disabled;
ready
Element.disabled
el.disabled
ready

Revisions

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