Get new jQuery plugins just once a week
September 14, 2013
Balanced-Gallery | A balanced photo gallery plugin for jQuery.
Balanced Gallery is a jQuery plugin that evenly distributes photos across rows or columns, making the most of the space provided. Photos are scaled based on the size of the ‘container’ element by default, making Balanced Gallery a great choice for responsive websites.
It has got the following options :-
- autoResize: re-partition and resize the images when the window size changes.
- background: the css properties of the gallery’s containing element.
- idealHeight: ideal row height, only used for horizontal galleries, defaults to half the containing element’s height.
- idealWidth: ideal column width, only used for vertical galleries, defaults to 1/4 of the containing element’s width.
- maintainOrder: keeps images in their original order, setting to ‘false’ can create a slightly better balance between rows.
- orientation: ‘horizontal’ galleries are made of rows and scroll vertically; ‘vertical’ galleries are made of columns and scroll horizontally.
- padding: pixels between images.
- shuffleUnorderedPartitions: unordered galleries tend to clump larger images at the begining, this solves that issue at a slight performance cost.
- viewportHeight: the assumed height of the gallery, defaults to the containing element’s height.
- viewportWidth: the assumed width of the gallery, defaults to the containing element’s width.
Created by Ryan
Sign up for our weekly newsletter.