usefulness of is(:visible)

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="something">
  hola
  </div

Teardown


    $('#something').hide();
  

Test runner

Ready to run.

Testing in
TestOps/sec
using is(:visible)
if (!$('#something').is(':visible')) {
  $('#something').show();
}
if (!$('#something').is(':visible')) {
  $('#something').show();
}
ready
without is(:visible)
$('#something').show();
$('#something').show();
ready

Revisions

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