Solved

JQuery LightBox - How do you get prev, next buttons functionality??? http://leandrovieira.com/projects/jquery/lightbox/

Posted on 2009-05-04
1
1,952 Views
Last Modified: 2012-05-06
http://leandrovieira.com/projects/jquery/lightbox/

How do you get the previous, next buttons to appear with gallery photos?
That is, how do you relate all the photos so the lightbox knows they are all contained in the gallery??

I cannot figure this out for the life of me.

My code is below - it opens the lightbox but does not show navigation buttons.
See http://bestof.apexhost.net.au/nsw/accomm.aspx - click on the photos links in the blue summary area to open lightbox - note how no navigation is opened.

Any help appreciated.
$("ul.photos a").each(function()
        {
            $(this).lightBox({
                fixedNavigation: true,
                overlayBgColor: '#000000',
                overlayOpacity: 0.8,
                imageLoading: '/images/lightbox/loading.gif',
                imageBtnClose: '/images/lightbox/closelabel.gif',
                imageBtnPrev: '/images/lightbox/prevlabel.gif',
                imageBtnNext: '/images/lightbox/nextlabel.gif',
                containerResizeSpeed: 350,
                txtImage: 'Photo',
                txtOf: 'of'
            });
        });

Open in new window

0
Comment
Question by:smacca
1 Comment
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 500 total points
ID: 24298328
You have to use the collection of elements to bind to the lightbox.
Not the individual items within the collection.

Use this
$("ul.photos a").lightBox({
    fixedNavigation: true,
    overlayBgColor: '#000000',
    overlayOpacity: 0.8,
    imageLoading: '/images/lightbox/loading.gif',
    imageBtnClose: '/images/lightbox/closelabel.gif',
    imageBtnPrev: '/images/lightbox/prevlabel.gif',
    imageBtnNext: '/images/lightbox/nextlabel.gif',
    containerResizeSpeed: 350,
    txtImage: 'Photo',
    txtOf: 'of'
});

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
would you please explain me the conditional part ? 4 21
PHP Form Calculate Total Price 10 40
Question about JQuery and asp.net 3 23
jQuery for Each 12 16
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now