Solved

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

Posted on 2009-05-04
1
1,959 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint and CAML query help 4 26
sort Multi-dimensional array 6 45
Why does my submit button remain disabled 3 36
Make New Browser Window Fully Functional 7 36
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
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…

739 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