Galleriffic
Galleriffic
Galleriffic is a jQuery plugin that provides a rich, post-back free experience optimized to handle high volumes of photos while conserving bandwidth. I am not so great at spelling, and it was much later that I realized that the more appropriate spellings would be Gallerific or Gallerrific, but is too late now for a name change, so Galleriffic remains.
View the DEMO
Galleriffic
A jQuery plugin for rendering rich, fast-performing photo galleries
Galleriffic is a jQuery plugin that provides a rich, post-back free experience optimized to handle high volumes of photos while conserving bandwidth. I am not so great at spelling, and it was much later that I realized that the more appropriate spellings would be Gallerific or Gallerrific, but is too late now for a name change, so Galleriffic remains.
Features
- Smart image preloading after the page is loaded
- Thumbnail navigation (with pagination)
- jQuery.history plugin integration to support bookmark-friendly URLs per-image
- Slideshow (with optional auto-updating url bookmarks)
- Keyboard navigation
- Events that allow for adding your own custom transition effects
- API for controlling the gallery with custom controls
- Support for image captions
- Flexible configuration
- Graceful degradation when javascript is not available
- Support for multiple galleries per page
Examples
- Minimal implementation
- Thumbnail rollover effects and slideshow crossfades
- Integration with history plugin
- Insert and remove images after initialization
- Alternate layout using custom previous/next page controls
Usage
- Download the latest version of Galleriffic below and jQuery 1.3.2 or later (use other versions of jQuery at your own risk)
- Setup the script references in the header:
<head> ... <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript" src="js/jquery.galleriffic.js"></script> <!-- Optionally include jquery.history.js for history support --> <script type="text/javascript" src="js/jquery.history.js"></script> <script type="text/javascript" src="js/jquery.opacityrollover.js"></script> ... </head> - Add container elements to your page. All container elements are optional, so you may choose to not include an area (such as the loading or caption container elements). Here is an example of all the elements needed for a full-featured setup:
<div id="controls"></div> <div id="loading"></div> <div id="slideshow"></div> <div id="caption"></div> <div id="thumbs"> ... graceful degrading list of thumbnails (specific format specified below) ... </div> - Within the thumbnails container element, build your graceful degrading unordered list of thumbnails linking to the image slides as such:
<div id="thumbs"> <ul class="thumbs noscript"> <li> <a class="thumb" name="optionalCustomIdentifier" href="path/to/slide" title="your image title"> <img src="path/to/thumbnail" alt="your image title again for graceful degradation" /> </a> <div class="caption"> (Any html can go here) </div> </li> ... (repeat for every image in the gallery) </ul> </div>It is important to specify the ´thumb´ class for the link that should serve as the thumbnail and the ´caption´ class for the element that should serve as the caption. When an image is selected for display in the slideshow, any elements with the ´caption´ class will be rendered within the specified caption container element above. - Initialize the gallery by calling the galleriffic initialization function on the thumbnails container, passing in optional settings. The following example shows the default options:
jQuery(document).ready(function($) { var gallery = $(´#thumbs´).galleriffic({ delay: 3000 // in milliseconds numThumbs: 20 // The number of thumbnails to show page preloadAhead: 40 // Set to -1 to preload all images enableTopPager: false, enableBottomPager: true, maxPagesToShow: 7 // The maximum number of pages to display in either the top or bottom pager imageContainerSel: ´´, // The CSS selector for the element within which the main slideshow image should be rendered controlsContainerSel: ´´, // The CSS selector for the element within which the slideshow controls should be rendered captionContainerSel: ´´, // The CSS selector for the element within which the captions should be rendered loadingContainerSel: ´´, // The CSS selector for the element within which should be shown when an image is loading renderSSControls: true, // Specifies whether the slideshow´s Play and Pause links should be rendered renderNavControls: true, // Specifies whether the slideshow´s Next and Previous links should be rendered playLinkText: ´Play´, pauseLinkText: ´Pause´, prevLinkText: ´Previous´, nextLinkText: ´Next´, nextPageLinkText: ´Next ›´, prevPageLinkText: ´‹ Prev´, enableHistory: false, // Specifies whether the url´s hash and the browser´s history cache should update when the current slideshow image changes enableKeyboardNavigation: true, // Specifies whether keyboard navigation is enabled autoStart: false, // Specifies whether the slideshow should be playing or paused when the page first loads syncTransitions: false, // Specifies whether the out and in transitions occur simultaneously or distinctly defaultTransitionDuration: 1000 // If using the default transitions, specifies the duration of the transitions onSlideChange: undefined, // accepts a delegate like such: function(prevIndex, nextIndex) { ... } onTransitionOut: undefined, // accepts a delegate like such: function(slide, caption, isSync, callback) { ... } onTransitionIn: undefined, // accepts a delegate like such: function(slide, caption, isSync) { ... } onPageTransitionOut: undefined, // accepts a delegate like such: function(callback) { ... } onPageTransitionIn: undefined, // accepts a delegate like such: function() { ... } onImageAdded: undefined, // accepts a delegate like such: function(imageData, $li) { ... } onImageRemoved: undefined // accepts a delegate like such: function(imageData, $li) { ... } }); });
FAQ
Will Galleriffic generate the slide and thumbnail images automatically?
I have been asked a lot if Galleriffic automatically generates the thumbnails and slides. Galleriffic by itself does not do any image processiong or generation; however, there is a great tool that does: jAlbum. I have created a jAlbum skin that I use myself for creating my personal galleries. After installing jAlbum and the Galleriffic jAlbum skin, simply choose your source image directory and an output directory, click "Make Album", and wallah, you now have a complete html gallery with 3 different size versions of each image.
How can I change the number of thumbnail columns?
With the stylesheet used in these examples, each thumbnail is floated left, and thus as many thumbnails that will fit in the width of the column will be displayed. If you want fewer or more columns, make the width of the navigation panel smaller or larger. In all but the last example, I am setting the width using javascript with the following lines in the html page:
$(´div.navigation´).css({´width´ : ´300px´, ´float´ : ´left´});
$(´div.content´).css(´display´, ´block´);
14 January 2010 Thursday





Comments
areillesdelm areillesdelm
2012-05-20 06:22:28babydolls & lingerie sets
Babydoll Dress
Lace Babydoll
cheap Lingerie Sets
Lingerie Sets sale
Couples Sex Toys
Adult Sex Toys
cheap Eyelashes
Intimate Apparel
Eberjey Lingerie
laspariseanicko laspariseanicko
2012-05-19 20:52:11Mens Vibram FiveFingers Bikila Shoes
Vibram FiveFingers Bikila Shoes
FiveFingers Bikila Shoes
cheap Vibram FiveFingers Shoes
Mens Vibram FiveFingers Classic Shoes
Vibram FiveFingers Shoes
discount Five Fingers Shoes
Vibram FiveFingers store
Womens Vibram FiveFingers Bikila Shoes
Vibram FiveFingers Running Shoes
dealex dealex
2012-05-19 02:54:18ugg boots
ugg australia
ugg boots sale
ugg boots on sale
ugg store
Kid UGG Boot Clearance
UGG On Clearance
UGG For Cheap
Women's Bailey Button Triplet1873
UGG Classic Paisley Boots
laspariseanicko laspariseanicko
2012-05-13 04:40:39Cheap Canada Goose Outlet
Canada Goose Shops
Goose Jackets
Canada Goose Jackets Women
Goose Down Jackets
Canada Goose Online
Canada Goose Jackets Chilliwack
Where To Buy Canada Goose
Parka Jacke
Canada Goose Sales
dealex dealex
2012-05-10 15:28:53lubergerwill lubergerwill
2012-05-10 00:10:29mbt shoes
mbt boots
buy mbt shoes
mbt online
mbt outlet
cheap MBT Karani
buy MBT Sapatu shoes
MBT Nama boots online
MBT Kamba boots outlet
buy MBT Salama
lubergerwill lubergerwill
2012-05-08 22:08:17babydolls & lingerie sets
Babydoll Dress
Lace Babydoll
cheap Lingerie Sets
Lingerie Sets sale
Deluxe Bullet
butt toys
Dreamgirl
plus size lingerie
Sexy Gift Sets
dealex dealex
2012-05-08 05:47:26buy boots
cheap boots
discount boots
wholesale boots
boots online
Tory Burch Sandal on sale
buy Roger Vivier shoes
Roger Vivier Pumps boots
Cheap Louboutin wedding
cheap christian louboutin replica
eesemattl eesemattl
2012-05-04 15:43:23Air Gear Cosplay
Air Costume
Cosplay Dress
Cosplay shop
Cosplay online
Cosplay outlet
Code Geass Cosplay Costume
Bleach Cosplay Costumes
Gundam Cosplay
discount Halloween Costumes
dejongricky dejongricky
2012-05-03 14:54:41ugg
ugg boots
ugg boots online
ugg boot sale
ugg boots clearance
UGG Gloves
UGGs Accessories on Sale
ugg boots outlet
UGG Roxy Short Boots
UGG Classic Tall Paisley Boots
eesemattl eesemattl
2012-05-03 14:07:19pandora
replica pandora jewelry
pandora on salepandora radio
discount pandorareplica pandora necklacePandora Beadsreplica Pandora Sets
buy Pandora Earringsdiscount Pandora Earrings
laspariseanicko laspariseanicko
2012-04-27 13:24:36babydolls & lingerie sets
Babydoll Dress
Lace Babydoll
cheap Lingerie Sets
Lingerie Sets sale
top picks
Pleasure Balls
Bath sale
sex toys store
Lelo Vibrator
eesemattl eesemattl
2012-04-25 14:20:39brands glasses
glasses
sungglasses
cheap sunglasses
buy sunglasses
Ferrari Sunglass sale
oakley sunglasses stores
Ed Hardy Sunglasses
Prada Sunglasses online
Authentic Chloe Sunglasses
eesemattl eesemattl
2012-04-22 12:08:50cheap handbags
Chanel bag
Coach bag
dior bag
Gucci bag
Coach Handbags sale
Hermes Handbag
Coach Handbag
Hermes Handbag online
wholesale Chanel Handbag
dejongricky dejongricky
2012-04-20 03:56:01ugg
ugg boots
ugg boots online
ugg boot sale
ugg boots cheap
UGG Ultra Short Boots
UGG Nightfall Boots
Ugg Classic Argyle Knit Boots
discount ugg shoes
UGG Sundance boots
dejongricky dejongricky
2012-04-16 00:02:23Cocktail Dresses
Evening Dresses
wedding dressesbridal gowns
bridal dresses buy Cocktail Dresses
Mother of Bride DressesLace Wedding DressesBridesmaid Dresses sale
buy Mother of Bride Dresses
dejongricky dejongricky
2012-04-16 00:01:33pandora on salecheap pandora
buy pandora
discount pandorapandoraPandora Sets SalePandora Earringsbuy Pandora BanglesPandora Bangles online
pandora earrings outlet
laspariseanicko laspariseanicko
2012-04-15 01:27:13ugg boots
ugg australia
ugg boots saleugg boots on sale
ugg storeUGG Roxy Bootsugg boots onlineUGG Tassel Boot Short 5835UGGS Adirondack Boot
UGG Australia Sale
dealex dealex
2012-04-15 00:52:57ugg
ugg boots
ugg boots australiaugg boot saleugg boots cheapWomen's Bailey Button BootsUGG Boots On Sale
UGG Classic Short BootsUGG Sundance bootscheap UGG Ultra Short Boots
dealex dealex
2012-04-11 09:08:09northface
the north face
north face outlet
northfaces sale
the north face jacket
sweatshirts
gore tex the north face
north face bags
shoes boots
gore tex jackets
lubergerwill lubergerwill
2012-04-08 15:34:18tiffany
tiffany and cotiffany jewelry
cheap tiffany jewelrytiffany salecheap tiffany key ringbuy tiffany key ringdiscount tiffany key ringcheap tiffany necklacestiffany earrings online
lubergerwill lubergerwill
2012-04-06 00:30:03Wedding Dresses
Cheap Wedding Dresses
Cheap Wedding Gowns
Unique Prom Dress
White Prom Dress
Yellow Prom Dresses
Lime Green Prom Dresses
Beach Wedding Dress
Simple Wedding Dresses
Christmas Party Dress
dealex dealex
2012-04-02 07:46:42north face jacketsnorthface
the northf face
north face stroe
north face online
The Northface Jackets Online
NorthFace BackpacksNorth Face SocksNorth Face Denali JacketsThe North Face Vests