jQuery Plugin For Fullscreen Image Viewer Chroma Gallery - Download jQuery Plugin For Fullscreen Image Viewer - Chroma Gallery

Download jQuery Plugin For Fullscreen Image Viewer – Chroma Gallery

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Fullscreen Image Viewer – Chroma Gallery, hope it will help you in programming stack.

jQuery Plugin For Fullscreen Image Viewer Chroma Gallery - Download jQuery Plugin For Fullscreen Image Viewer - Chroma Gallery
File Size: 27.1 MB
Views Total: 6230
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Chroma Gallery is a jQuery image gallery / viewer plugin that enlarges and displays your images in a fullscreen, navigatable modal popup. In addition, it extracts the dominant color from your image and applies the color to the background overlay of the modal popup. It also uses jQuery Masonry plugin to create a responsive, fluid grid layout for the thumbnail images.

How to use it:

1. Include jQuery library and the jQuery Chroma Gallery plugin’s files in the html page.

1 <link rel="stylesheet" href="stylesheets/chromagallery.css">
2 <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
3 <script src="scripts/chromagallery.js"></script>

2. Include other required resources in the html page.

1 <script src="scripts/modernizr-chrg.min.js"></script>
2 <script src="scripts/masonry.min.js"></script>

3. Add thumbnails with full-sized images specified using data-largesrc attribute to a container.

1 <div class="chroma-gallery mygallery">
2   <img src="thumb-1.jpg" alt="Pic 1" data-largesrc="1.jpg">
3   <img src="thumb-2.jpg" alt="Pic 2" data-largesrc="2.jpg">
4   <img src="thumb-3.jpg" alt="Pic 3" data-largesrc="3.jpg">
5   <img src="thumb-4.jpg" alt="Pic 4" data-largesrc="4.jpg">
6   <img src="thumb-5.jpg" alt="Pic 5" data-largesrc="5.jpg">
7   ...
8 </div>

4. You can also add images to the gallery using items option.

01 $(".mygallery").chromaGallery({
02   items:[{
03     src: 'thumb-1.jpg',
04     alt:'Pic 1',
05     largesrc:'1.jpg'   
06   },{
07     src: 'thumb-2.jpg',
08     alt:'Pic 2',
09     largesrc:'2.jpg'   
10   },{
11     src: 'thumb-3.jpg',
12     alt:'Pic 3',
13     largesrc:'3.jpg'   
14   },{
15     src: 'thumb-4.jpg',
16     alt:'Pic 4',
17     largesrc:'4.jpg'   
18   },{
19     src: 'thumb-5.jpg',
20     alt:'Pic 5',
21     largesrc:'5.jpg'   
22   }]
23 });

5. Initialize the plugin and done.

1 $(".mygallery").chromaGallery();

6. Configuration options.

01 $(".mygallery").chromaGallery({
02 color: "chroma",
03   maxColumns:4,
04   items:null,
05   dof:false, //experimental
06   screenOpacity:0.95,
07   lazyLoad:true,
08   gridMargin:7,
09   fullscreen:true,
10   easing:'easeInOutQuart',
11   onLoad:function(){},
12   onOpen:function(){},
13   onClose:function(){},
14   onNext:function(){},
15   onPrev:function(){},
16   onFullscreen:function(){}
17 });

7. Methods.

01 var mygallery = $(".mygallery").chromaGallery();
02  
03 // open the second image
04 mygallery.chromaGallery("openImg",1);
05  
06 // open the second image
07 mygallery.chromaGallery("closeImg",1);
08  
09 // goto the third image
10 mygallery.chromaGallery("goTo",2);
11  
12 // prev image
13 mygallery.chromaGallery("prev");
14  
15 // next image
16 mygallery.chromaGallery("next");

Change log:

2015-11-01

  • Improved overall performance
  • Improved navigability when a image is opened
  • Improved performance when using depth of field
  • Shadows added to imgWrap
  • Index added to chroma screen
  • Fix next and prev functions when the image is not available
  • Removed imagesLoaded dependecy

This awesome jQuery plugin is developed by codecrafting-net. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net