Solved

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

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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

617 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