jquery removeAttr() vs classic js removeAttribute() (v4)

Revision 4 of this benchmark created by wydok on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<input type="text" disabled="disabled" id="btn"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery removeAttr()
$("#btn").removeAttr("disabled");
ready
standard js
document.getElementById('btn').removeAttribute("disabled");
ready
jquery + standard js
$(document.getElementById('btn')).removeAttr("disabled");
ready
jquery + access element
$('#btn')[0].removeAttribute("disabled");
ready

Revisions

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