Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2012
    Location
    Huddersfield, West Yorkshire
    Posts
    68
    Member #
    33961
    Liked
    5 times

    Unhappy Turning Lighbox images, into a slideshow

    I am creating a website. On this site I am using the same Lightbox script I have used for years. Its simple, loads fast and I have never had complaints. Now, this client want something where you click the image, the larger image pops up in the Lightbox, and you need to be able to cycle left and right.
    Discover Bulgaria - Holiday Lettings in Bulgaria
    Is there anything I can add to the lightbox script to make this cycle through to the next large image?
    You can see the Lightbox script here :- CodePen - A Pen by Studio Team

  2.  

  3. #2
    Member
    Join Date
    Nov 2012
    Location
    Huddersfield, West Yorkshire
    Posts
    68
    Member #
    33961
    Liked
    5 times
    Issue Solved -


    <ul> <li><a href="#" class="lightbox">Photo 1</a></li> <li><a href="#" class="lightbox">Photo 2</a></li> <li><a href="#" class="lightbox">Photo 3</a></li> <li><a href="#" class="lightbox">Photo 4</a></li></ul><div id="menu" style="display:none;"> <a href="#" id="prev">&laquo; Prev</a> <a href="#" id="next">Next &raquo;</a></div>$('.lightbox').click(function(){ $('.lightbox').removeClass("active"); $(this).addClass("active"); $('#menu').show();});$('#next').click(function(){ var img_index = $('.lightbox.active').index('.lightbox')+1; if($('.lightbox:eq('+img_index+')').size()==0) $('.lightbox:first').click(); else $('.lightbox:eq('+img_index+')').click();});$('#pr ev').click(function(){ var img_index = $('.lightbox.active').index('.lightbox')-1; if(img_index<0) $('.lightbox:last').click(); else $('.lightbox:eq('+img_index+')').click();});


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:27 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com