Easy image carousel with lightbox using Flexslider2 and Lightbox.js
dateAugust 05 2016 | comments 10 comments
Click on a thumbnail to open the lightbox.

There aren't many open source plugins available on the market that allow you to build a image carousel with thumbs that open a lightbox on click. 
 
Fortunately, you can combine two of the most widely used plugins in order to achieve this functionality: flexslider2 and lightbox.js
 
First, you'll want to integrate the flexslider with carousel thumbnails. Head over to their page for an example or follow the one below. 
 
Next I'll want to add lightbox functionality on the carousel thumbnails. For this, wrap the individual images into <a> tags with the data-lightbox attribute.
This will open up the lightbox gallery on click. 
<div class="flexslider" id="carousel"> <ul class="slides"> <li> <a data-lightbox="example" href="images/slide1.jpg"><img src="images/slide1.jpg" /></a></li> <li> <a data-lightbox="example" href="images/slide2.jpg"><img src="images/slide2.jpg" /></a></li> <li> <a data-lightbox="example" href="images/slide3.jpg"><img src="images/slide3.jpg" /></a></li> </ul> </div>
It's that simple. 

Here is the full example: <!doctype html=""> <html id="content" lang="en"> <head> <link href="flexslider.css" rel="stylesheet" /> <link href="lightbox.min.css" rel="stylesheet" /> </head> <body> <div class="flexslider" id="slider"> <ul class="slides"> <li> <img src="images/slide1.jpg" /></li> <li> <img src="images/slide2.jpg" /></li> <li> <img src="images/slide3.jpg" /></li> </ul> </div> <div class="flexslider" id="carousel"> <ul class="slides"> <li> <a data-lightbox="example" href="images/slide1.jpg"><img src="images/slide1.jpg" /></a></li> <li> <a data-lightbox="example" href="images/slide2.jpg"><img src="images/slide2.jpg" /></a></li> <li> <a data-lightbox="example" href="images/slide3.jpg"><img src="images/slide3.jpg" /></a></li> </ul> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><script defer src="jquery.flexslider-min.js"></script><script defer src="lightbox.min.js"></script><script> $(document).ready(function() { $('#carousel').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, itemWidth: 150, itemMargin: 5, asNavFor: '#slider' }); $('#slider').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, sync: "#carousel" }); }); </script></body> </html> </!doctype>
 

dateAugust 05 2016 | comments 10 comments

Easy image carousel with lightbox using Flexslider2 and Lightbox.js
Comments
health entrepreneur
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work.
11/20/2022 10:13:34 AM
current update news
Incredible article! Thank you for such a significant article. It is really a nice and informative one, It really helps me to increase my knowledge!! Also for more interesting live breaking news & Stories then visit here.
3/26/2021 10:56:47 AM
entrepreneur magazine
Keep it up, Really appreciate that, an excellent and decent post. I found this much informative. Also, visit for more Startup news updates.
3/26/2021 8:30:39 AM
Designer Jaipuri Kurtis
Nice post !! Thanks for Sharing such an Interesting Post, This site and I consider this web website is extremely instructive ! Keep on setting up! you Will Also Love to Read About Latest Designer Jaipuri Kurtis to Watch click Here.
6/30/2020 12:28:51 PM
Best Free Driver Updater
This is a great post you share here. I just love the way you write this post. Thank You for sharing this informative post with us. Keep this great job up!
4/15/2020 2:56:37 PM
Rahu kaal
I liked the post and the shared information. By reading about Rahu Kaal you may reduce the negative outcome in career, finance and love life.
4/14/2020 1:07:42 PM
seo services for ecommerce website
Hi Dear, have you been certainly visiting this site daily, if that's the case you then will certainly get good knowledge.
2/6/2020 12:40:41 PM
<a href="https://www.digkes.com/digital-marketing-seo-training/pitampura.html">digitpura</a>
Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene.
5/15/2019 7:34:18 AM
digital marketing training in pitampura
Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene.
5/15/2019 7:33:20 AM
Prasad
Hey,

Thanks for article. I used this with " ezPlus" Image Zoom/Viewer/Gallery jQuery Plugin.
3/21/2019 6:30:34 AM
Leave comment



 Security code