Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

708 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

19 Experts available now in Live!

Get 1:1 Help Now