Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbox Next Image Click Not Working

    Hi,

    I've created lightbox image galleries for websites before that have all worked perfectly fine however I have now tried to copy and paste the code for a specific gallery into a new HTML file and although the thumnails and larger images work, I can now only click on the left side of each larger image to go to the previous image and cannot click on the right side to go to the next image, despite the fact that the code is exactly the same to the T as the code in another HTML file.

    The mouse cursor doesn't even change to indicate the function being there. Not much use only being able to the end of the gallery and then going backwards through the images.

    The only time in this gallery the next / right button actually works is from the first image to the second, no further.

    Anyone else had this problem or know what might be causing it?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Line 438 in your JavaScript file has a syntax error.

  • #3
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    Line 438 in your JavaScript file has a syntax error.
    Javascript file as well as all other code is an exact replica of a fully working gallery without this issue present.....

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Yeah, I know because I read your mind. But obviously you didn’t get my irony and my hint.

    Seriously, there is no way to tell you what’s wrong if you don’t post any code.

  • #5
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code for the gallery division in the HTML file:


    <div id="gallery">

    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/lightbox-2.6.min.js"></script>

    <a href="images/gtlimage1.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb1.jpg" alt="gtlthumb1" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage2.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb2.jpg" alt="gtlthumb2" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage3.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb3.jpg" alt="gtlthumb3" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage4.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb4.jpg" alt="gtlthumb4" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage5.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb5.jpg" alt="gtlthumb5" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage6.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb6.jpg" alt="gtlthumb6" style="border: 2px grey solid" /> </a>
    <br>
    <a href="images/gtlimage7.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb7.jpg" alt="gtlthumb7" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage8.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb8.jpg" alt="gtlthumb8" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage9.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb9.jpg" alt="gtlthumb9" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage10.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb10.jpg" alt="gtlthumb10" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage11.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb11.jpg" alt="gtlthumb11" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage12.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb12.jpg" alt="gtlthumb12" style="border: 2px grey solid" /> </a>
    <br>
    <a href="images/gtlimage13.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb13.jpg" alt="gtlthumb13" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage14.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb14.jpg" alt="gtlthumb14" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage15.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb15.jpg" alt="gtlthumb15" style="border: 2px grey solid" /> </a>
    <a href="images/gtlimage16.jpg" data-lightbox="gallery" rel="lightbox[gallery]"> <img src="images/gtlthumb16.jpg" alt="gtlthumb16" style="border: 2px grey solid" /> </a>
    <br>

    <!--Add six images followed by br tags-->

    </div>




    Links to files in head section (don't know if needed):


    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />

  • #6
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just tell me if you need anything else

  • #7
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Development:

    Might not be so bad but still something wrong.

    The 'X' close button to bottom right of the images seems to working as the next image button rather than the close button.

  • #8
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Development again:

    Have just found out that the right / next arrow is showing, but is well below the image and is further down on the page.

    Positioning of the arrow is clearly f****d up


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •