Lightbox vs Shadowbox

JavaScript performance comparison

Test case created by Josh

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//www.shadowbox-js.com/build/shadowbox.js"></script>
<script src = "//turbojs.googlecode.com/svn/trunk/js/turbo.js"></script>

<div id="lightbox-content" style="display: none">
  <div class="trLightbox-title">
    Title
  </div>
  <div class="trLightbox-content">
    This will appear in a lightbox
  </div>
</div>
<script>
  Shadowbox.init({
   // let's skip the automatic setup because we don't have any
   // properly configured link elements on the page
   skipSetup: true
  });
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Shadowbox
Shadowbox.open({
 content: '<div id="welcome-msg">Welcome to my website!</div>',
 player: "html",
 title: "Welcome",
 height: 350,
 width: 350
});
pending…
Lightbox
Turbo.Lightbox.show('#lightbox-content');
pending…
#
//
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment