Solved

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

Posted on 2009-05-04
1
1,951 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

895 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

13 Experts available now in Live!

Get 1:1 Help Now