jQuery Lightbox in Drupal, via jLightbox

Posted on September 18th, 2007 | No Comments »

Daniel Kudwien took the time to package v0.2 of jQuery Lightbox as a Drupal module.  You can check it out at http://drupal.org/project/jlightbox

jQuery Lightbox Version 0.3

Posted on September 17th, 2007 | 15 Comments »

NOTE: jQuery Lightbox v0.3 is a very old release.  I’ve recently released version 0.5 and highly suggest you download that release as it fixes many bugs that exist in v0.3 as well as introduces a host of new features.

Nearly 50 days after the last release,  jQuery Lightbox has made it to v0.3, a stable version which should be ready to be used anywhere you’d like.  There haven’t been any major changes to the codebase,  mainly just bug fixes.  Here’s a brief list of issues that have been addressed:

  • Overlay image wasn’t properly resizing with the browser window.Fixed by changing the width of #overlay from a pixel width, to simply 100%
  • Clicking close would generate scrollbars in Firefox V2.0.0.5Fixed by modifying the style associated with the close button.
  • Clicking the “Next” and “Previous” buttons could render the lightbox in a constant state of loading.Issue diagnosed as jQuery firing multiple instances of the .click() method on mouse down.  Workaround was to introduce an “in progress” variable to all transitions, preventing multiple requests to load an image.  I’m not 100% happy with this method, but it works well for now.
  • Browsing through images of similar sizes could cause the lightbox to not show a new image.Fixed by removing conditional resizing of the lightbox.  Now  hDiff and wDiff are disregarded attempts to resize the box.  A horizontal and a vertical resize are requested on each image load.  This should have no negative effects on image galleries.
  • Several other small bug fixes surrounding CSS.

With this,  jQuery Lightbox should now act as a fully functional lightbox replacement.  The next steps in the process will be to rewrite portions of the code with jQuery’s “Write less, do more” philosophy.  On top of that,  there have been several requests to add “Slideshow” functionality.

I don’t think a slideshow will ever make it into the codebase, unfortunately.  This script was written to be a lightbox replacement, and I think it does that rather well.  Writing a script to work alongside of this could be done in a few simple lines of jQuery, and I may even provide them somewhere in the future,  but they won’t be in the main lightbox.js codebase.

As always,  comments are welcome, and encouraged.  Please let me know any experience you may have with this, as the drive is on now to really get this written as some solid jQuery code.

Cheers!

Download jquery-lightbox-0.3.zip 

A word on the jQuery Lightbox

Posted on September 13th, 2007 | 1 Comment »

It’s been a while since i’ve posted an updated to the jQuery Lightbox script I uploaded.  Don’t worry,  I haven’t forgotten it,  and I know that there are still bugs to be fixed.  I simply had a few busy weeks with work, followed by a much needed vacation.  There should be a new version online in the near future.  Here’s what I plan to address in the next release:

  • After closing the lightbox, it sometimes doesn’t re-open
  • In Firefox 2.0+ you get scrollbars when you click the close button
  • Overlay doesn’t resize when you resize the window.

jQuery Lightbox Issues

Posted on August 3rd, 2007 | 1 Comment »

It’s been a few days, and several people have downloaded the jQuery Lightbox.  I’ve already received some feed back, and have isolated a few issues.  The current bugs all seem to revolve around clicking the “Next” and “Previous” buttons.  Clicking these buttons often shuffles the activeImage array.  I currently see two possible solutions to this issue:

  • Determine which jQuery click() event is creating the shuffle, and fix it
  • Modify the script so that the image set is circular, in which getting to the end of the gallery brings you back to the beginning.

I think this is the only  bug that could stop adoption of this script, at the moment.  Hopefully i’ll get it wiped out this weekend.

jQuery Lightbox V0.2

Posted on July 31st, 2007 | 13 Comments »

NOTE: jQuery Lightbox v0.2 is a very old release.  I’ve recently released version 0.5 and highly suggest you download that release as it fixes many bugs that exist in v0.3 as well as introduces a host of new features.

A quick update to the jQuery Lightbox i’ve been working on. Version 0.2 include:

  • Refactored straight DOM manipulation in favor of jQuery’s .appen() method.
  • Removed several dead functions
  • Encapsulated the whole object, so as not to rely on external functions (some function names may have conflicted with other libraries, etc.)

It’s a minor change, and is still functionally the same, but it’s getting closer to what I want it to be. Get it while it’s hot!!

jquery-lightbox-0.2.zip