display:none VS $.hide() VS $.addClass('hidden') (jQuery 1.5.2) (v11)

Revision 11 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-1.5.2.min.js"></script>
<style>
.hidden { display:none; }
</style>
<p id="p">Algo</p>
<p id="p2" class="algo">Algo con class</p>

Test runner

Ready to run.

Testing in
TestOps/sec
Display:none
$('p').css('display','none');
ready
$.hide()
$('p').hide();
ready
class hidden
$('p').addCLass('hidden');
ready

Revisions

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