treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Lightbox JS v2.0

  • hey guys, I recently stumbled upon Light Box, and I thought I would give it a shot..

    I did everything it said and when I Click the link, it opens the link instead of of the picture..

    Here's the page

    Any help would be great..

    thanks.
  • I think it's because you can't use lightbox with the other libraries that you are using. I don't think it works with scriptaculous or prototype. I don't remember which one. If you want to figure it out, delete one of those calls from your header and test the lightbox. To use a lightbox effect that does work with those libraries, google shadowbox. Same kind of thing, even works with rel="lightbox" or rel="shadowbox" both will work. I like it because if you have lightbox all in your code, you don't need to change it.
  • actually, those came with it, it's actually the jQuery library that's messing it up..

    thank you for the reply tho.
  • yes, that's right. I couldn't remember. In any case, I just had this problem myself because I have a website that has a lot of pictures and I had a jquery slider and needed the lightbox to work. It won't work with the slider. I had the coda slider working on the site but not the lightbox. I had to use the shadowbox to get it working. Take a look

    http://www.photobyiris.com
  • Oh, very nice site. I favorited it.
  • FYI I had the same problem using mootools.js with lightbox.

  • Putting jQuery.noConflict() at the top of your script and wrapping all your jQuery with

    (function($) {
      // Your jQuery goes here
    })(jQuery);
    

    might help. jQuery has some documentation on using it with other libraries.