Browser Diet - jQuery Selectors (v26)

Revision 26 of this benchmark created on


Preparation HTML

<header class="top-header ">
        <div class="ui page grid">
            <div class="column" id="scroll-menu">
                <a href="#scroll-body"> <img class="header-logo" src="/images/logo79.png"/> </a>
                <div class="header-menu">
                    <div class="header-caption">Information & Technologies</div>
      <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
context
if (!$('.test4.slim')) {
  $('.test4').addClass('slim');
ready
selector
if (!$('.test4.slim')) {
  $('.test4').addClass('slim');();
ready
context and find()
if (!$('.test4.slim')) {
  $('.test4').addClass('slim');
ready
created context
if (!$('.test4.slim')) {
  $('.test4').addClass('slim');

}
ready
selector and find
$('.test4').addClass('slim');
ready
parent/child selector
if (!$('.test4').hasClass('slim')) {
  $('.test4').addClass('slim');

}
ready
immediate children
if (!$('.test4').is('.slim')) {
  $('.test4').addClass('slim');

}
ready

Revisions

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