XBox 360 Warranty Replacement - The Outcome Final Fantasy IV Trailer

jQuery Lightbox Version 0.4

NOTE: This is an older release.  Version 0.5 has been released, and it acts better as a true jQuery plugin.  It is recommended that you download Version 0.5 to get all of the new improvements.

New in this release:

  • Added loading/close images as variables
  • Added resize speed variable
  • Migrated resize event into one animation, instead of two
  • Removed stray console.log() calls
  • Fixed updateImageList so more images can be added via AJAX calls

I believe all the bugs in this release should be fixed.  It should operate fine in place of the original lightbox.js without any real problems.  I’d appreciate if you could leave a comment with notes of any problems you have,  so this can be cleared up quickly.

Come and get it!

jquery-lightbox-0.4.zip

Cheers!

34 Responses to “jQuery Lightbox Version 0.4”

  1. Torben Says:

    Hi there,

    thanks for this release. Essentially, it seems to work quite nicely. However, v0.4 of the jQuery Lightbox is not compatible with jQuery v1.1.4, which is the default version shipped with Wordpress 2.3. If it is not too much work, it would be nice to have it backward compatible in order to ease migration for all those WP users out there.

    And I don’t really like the resizing as a single animation. I’d appreciate to have it configurable through a variable whether to have the original behaviour or the new one. I guess most of the folks intending to use this great script appreciate the look of the old Lightbox but hate the bloated Prototype/Scriptaculous lib. Hence, it would be nice to have a clone that is as close to the original as possible…

    What about renaming it using the usual jQuery plugin naming conventions to: “jquery.lightbox.js”?

    Finally, a packed/minified version would be nice to have.

    Cheers,
    Torben

  2. Mdkart Says:

    Can you tell me how to use updateImageList because I don’t found it in lighbox .js

  3. Daniel F. Kudwien Says:

    Warren, after a quick diff of 0.4 to the latest development snapshot of jLightbox module, it seems that you still haven’t ‘upgraded’ your version. As mentioned before, the version hosted on Drupal.org contains several bugfixes. Additionally, the code has been fixed to allow javascript compression and, of course, there’s already a packed version of the script.

    See the changelog: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/jlightbox/CHANGELOG.txt?revision=1.4&view=markup&pathrev=HEAD

    As you can see, development is moving straight forward. It would be great if we could somehow join forces.

    greetings,
    Daniel

  4. Mdkart Says:

    Ok, I need to use Lightbox.initialize(); instead of updateImageList(), ins’t it?

  5. Welja Says:

    Thx!
    Had a problem with the jQuery.noConflict();
    A simple find&replace $ with jQuery did the trick!

  6. Manu2.07 Says:

    I was desperate to find a real alternative of Lightbox for Jquery (without thickbox…)

    Thanks for your Jquery clone of lightbox, great work !!!

  7. bruce Says:

    Can you please put a link to your website in the start of the .js file.
    I’ve had to search for jquery lightbox a number of times now when trying to retrack down the source

    :)

    -bruce

  8. Allan Says:

    Do you plan on making the plugin compatible with IE6?

  9. Ben Sparrow Says:

    Still having issues with IE6 sadly (line 43)

  10. max balestrieri Says:

    in initialize:

    bug:
    $(’#outerImageContainer’).css({width: ‘250px’, height: ‘250px;’});
    correct:
    $(’#outerImageContainer’).css({width: ‘250px’, height: ‘250px’});

    now ok in ie6

    now i try to pack

  11. max balestrieri Says:

    now ok. also in ie6. also compressed. (sorry for english)
    compressed here :http://dean.edwards.name/packer/

    bugs:
    1)
    };//bug row 119
    2)
    windowHeight);//bug row 326
    3)
    Array(xScroll,yScroll);//bug row 344

    bye max

  12. max balestrieri Says:

    sorry for previous post.
    bug for ie6:

    in initialize:

    bad:
    $(’#outerImageContainer’).css({width: ‘250px’, height: ‘250px;’});

    good:
    $(’#outerImageContainer’).css({width: ‘250px’, height: ‘250px’});

    bye max

  13. TrevC Says:

    Thanks for your hard work, this script works great. However, it’s still causing JS errors in the IE6 and IE7 status bar. Line 43…. How can this be fixed?

  14. Ricardo Says:

    Have you tried it with IE7? IE7 states that there is an error on the page.

    Great work

  15. juan Says:

    Hi,
    there is a little bug in line 42, you should write height: ‘250px’ instead of height: ‘250px;’

  16. Mdkart Says:

    Hi!I was havins a bug with IE7 and my K2 Theme : My rolling archive navigation disappeared when your lightbox script was inserted in the header. Delete line 42 : $(’#outerImageContainer’).css({width: ‘250px’, height: ‘250px;’}); fixed the problem.

  17. TrevC Says:

    http://leandrovieira.com/projects/jquery/lightbox/

  18. David Sanchez Says:

    Juan, thanks for that annoying detail, it really helped!

  19. Julien Says:

    Thanks for this great work ;-)

    small bug in album mode: when one of the picture does not have a legend, the previous one is displayed…

    Bug:
    if(Lightbox.imageArray[Lightbox.activeImage][1]){
    $(’#caption’).html(Lightbox.imageArray[Lightbox.activeImage][1]).show();
    }

    My correction :
    var captionText = ”;
    if(Lightbox.imageArray[Lightbox.activeImage][1]){
    captionText = Lightbox.imageArray[Lightbox.activeImage][1];
    }
    $(’#caption’).html(captionText).show();

  20. pielgrzym Says:

    Hello,

    Your script is a life savior! I found an error in version 0.4 - in line 43 there is a “,” instead of “;” which causes problems mainly on IE :)

    I have a problem with the script. When I load page contents via jquery’s .load method (the simple ajax) your script stops working :( Could you help to investigate this problem (I’m a javascript newbie)? :)

    Thanks in advance! :)

  21. Hedi Says:

    I’m having this weird bug when opening my site from Safari, a black curtain appears on the top of the page and a lightbox empty window is displayed in the bottom..

  22. René Says:

    Good job and many thanks for that. :)

    Just to improve and smoothen the resize animation a little bit, replace

    $(’#outerImageContainer’).animate({width: widthNew, height: heightNew},Lightbox.resizeSpeed,’linear’,function(){
    Lightbox.showImage();

    });

    with

    $(’#outerImageContainer’).animate({height: heightNew},Lightbox.resizeSpeed,’linear’,function(){
    $(’#outerImageContainer’).animate({width: widthNew},Lightbox.resizeSpeed,’linear’,function(){
    Lightbox.showImage();

    });
    });

    in the “resizeImageContainer” function.

    Best regards.

  23. Nick Says:

    3 things:
    1. I love this plugin! Keep up the great work!
    2. Is there a way to keep the image centered (or just fix the whole page) if the user tries to scroll? I messed around a little with fixed and static positioning in the css file without success.
    3. In IE 6/7, the bottom nav bar width is less than the width of the box above, so it looks odd. I notice this doesn’t happen on your example site, so maybe its something I am doing wrong. I excluded all other css files on my page and still have the same problem. Any idea what this could be?

    Thanks,
    Nick

  24. Nick Says:

    Never mind… its a doctype issue

  25. Benjamin "balupton" Lupton Says:

    Hi, I have made some needed changes to your jQuery Lightbox script to stop a always present error in IE7 (the invalid argument on line 43) error (Thomas this is probably the one you were experiencing), as well as adding a automatic url detector thing for the images (Eg. fileLoadingImage and fileBottomNavCloseImage)

    I can’t seem to find your email anywhere, so I’ve uploaded it to http://www.balupton.com/sandbox/jquerylightbox.zip

    Thanks, and hope you submit my changes :)

  26. Benjamin "balupton" Lupton Says:

    That invalid argument fix needs to be applied to the version you are hosting, I just spent a hour or two hunting it down today! And many people have reported it here.

    Anyway, I have made another change. This is so it will automatically detect the url for the images, so you don’t need to specify them manually.

    var Lightbox = {
    baseurl:”, /* set later */
    blah blah blah
    initialize: function() {
    // set baseurl
    this.baseurl = $(’script[src$=lightbox.js]’).attr(’src’);
    this.baseurl = this.baseurl.substring(0, this.baseurl.length-String(’lightbox.js’).length);
    // apply baseurl
    this.fileLoadingImage = this.baseurl+this.fileLoadingImage;
    this.fileBottomNavCloseImage = this.baseurl+this.fileBottomNavCloseImage;

  27. Benjamin Lupton Says:

    That invalid argument fix needs to be applied to the version you are hosting, I just spent a hour or two hunting it down today! And many people have reported it here.

    Anyway, I have made another change. This is so it will automatically detect the url for the images, so you don’t need to specify them manually.

    var Lightbox = {
    baseurl:”, /* set later */
    blah blah blah
    initialize: function() {
    // set baseurl
    this.baseurl = $(’script[src$=lightbox.js]’).attr(’src’);
    this.baseurl = this.baseurl.substring(0, this.baseurl.length-String(’lightbox.js’).length);
    // apply baseurl
    this.fileLoadingImage = this.baseurl+this.fileLoadingImage;
    this.fileBottomNavCloseImage = this.baseurl+this.fileBottomNavCloseImage;

  28. Rob Says:

    Hi,

    I am having the same problem as “Hedi” above. In safari i get a back box at the top and an empty lightbox area at the bottom. Any ideas on how to stop this? If i reload the page it seems to fix it, but still not good!

    Thanks

  29. milan Says:

    @Rob, Heidi:

    Try to load “lightbox.css” before “lightbox.js”. I had the same problem with Safari and this seems to be the solution.

  30. SonNguyen Says:

    Have problem with overlay layer when It work on IE 6. Overlay cannot resize to all screem width [ on scroll area ]

  31. Roman Says:

    Nice Script!

    How can I move the Next and Previous buttons to the bottom and the Close button to the top? I think that would be more intuitive…

    Thanks,
    -Roman

  32. Sandra Says:

    Hi,
    I am looking into placing the Next and Previous buttons on the bottom and Close on the top(in the right corner). I use the 0.4 version…can anybody help me with this? Where do I change it? I am slightly familiar with javascript, so any help with where I change/place the code making it work would be greatly appreciated? Thank you
    Alexandra

  33. danicted Says:

    Hi,

    I want to know how can I remove jQuery Lightbox Plugin (balupton edition) from this light box?

    thanks
    dan

  34. beginner Says:

    Please, need help.
    How can I load the lightbox without having to click on the image for example??

Leave a Reply