The plugin
This little jQuery image gallery plugin is basicly recreates the standard built-in window scrolling with a smooth easing effect. It is still in an early, development state, thus it may suffer from issues; but I will be working on it to make jReelGallery a more solid and robust widget.
The idea came while I was browsing the internet for available galleries for jQuery. I have seen a lot of good solutions but none of them fullfilles all the requirements I have been looking for. I decided to create a new plugin with all the features I need or consider as important: simplicity, usability and light-weight code.
Usability
Nowdays usability should be a very important and crucial part of a any web project. By extending the availability of your site and presenting it to wider audience, you increase the probability of achieving more visits which is leading to more sales, conversions and success.
In programming soemtimes it is really hard but not impossible at all to be light-weight and userfriendly at the same time. Sometimes you need to sacrifice a few things to stay between of the limits. This time the sacrifice was to give up the degradation when javascript is turned off. Whats left is a nice navigation: the plugin provides several ways to scan through the gallery. Mainly all the default(?) features, namely mouse scrolling, up and down arrow keys, home and end buttons, you would use while browsing in a window are available. In the future I would like to widen the “shortcuts” to include page down / up as well. Moreover, make it possible to configure it as you wish.
Usage
HTML
<ul id="jreel-gallery"> <li><img src="images/1.jpg" alt="1.jpg" /></li> <li><img src="images/2.jpg" alt="2.jpg" /></li> <li><img src="images/3.jpg" alt="3.jpg" /></li> </ul>
JavaScript
jQuery(document).ready(
function(){
$('#images').css('height',$(window).height()); /* I set the height by javascript to fill the full screen */
$("ul#jreel-gallery").reelGallery();
}
);
CSS
ul#jreel-gallery {
width: 400px;
height: 1px; /* In the example I set the height by javascript, see above */
margin: 0 auto;
padding: 0px 50px;
overflow: hidden;
}
ul#jreel-gallery li {
width: 400px;
height: 300px; // Important! See below
background: #fff;
margin: 35px 0px;
position: relative;
}
ul#jreel-gallery img {
width: 400px;
height: 300px; // Important! See below
}
Note: I use precise dimensions for the images. It is not necessary to give the proper size of each and every image, but it comes with a price. The code itself contains an algorithm for this case that will calculate the all the heights by measuring the images. Problem is solves, or isn’t? No, because to calculate the proper size all the images, they have to be loaded before the algorithm is running. This means you need to use a preloader for your website or otherwise you are forced to give the dimensions by hand. It’s up to you. I suggest using a preloader.
In the demo I’m using a preloader, because I want to show the full potential of the plugin. I combined it the famous thickbox plugin and a PHP on-the-fly thumbnail generator.
Options
| maxAcceleration : 20 | Actually it’s a negative acceleration. This number is used when the gallery reaches the end or top. It slows down the easing. Higher number means smaller easing (= takes more time to stop). |
| speedFactor: 0.2 | It’s the factor of the easing. Very sensitive. Try changing it to 0.1 for example. |
| framesPerSecundum: 33 | How often should the code refresh in a second? Like speedFactor, changing it may require a fine tuning on other options (like speedFactor) |
| eventArea: ‘document’ | Where the events should be triggered? |
| keyEvents: true | Should the keyboard shortcuts (up, down, home, end) be enabled? |
| mouseEvents: true | Should the mouse scrolling be enabled? |
Sources
- jQuery MouseWheel by Brandon Aaron
- Thickbox 3.1 – One Box To Rule Them All by Cody Lindley
- Query Loader by Gaya Kessler

Pingback: TRIM – Stations of the Cross | The Urban PhotoJournal
Pingback: 14 Outstanding jQuery Plugins & Tutorials « The Creative Project
Pingback: プリロード機能付きのイメージギャラリー jReelGallery | SNAP MAGAZINE
What license is this under?
Hi,
The plugin is licenced under creative commons. You can modify, redistribute or whatever you want until you add the the source i.e. my website’s url to it.
Pingback: 165 Awesome jQuery Sliders and Other Useful jQuery Effects - tripwire magazine
Pingback: 165个惊艳的jQuery slider以及其他特效 | 百锐网
Pingback: JQuery Sliders Collection | SiteDev101.com
Pingback: 165 Awesome jQuery Sliders and Other Useful jQuery Effects | INFOXE
Pingback: 2Chirp.Biz » 165 Awesome jQuery Sliders and Other Useful jQuery Effects
Any new versio for this jquery plugin?
Hi dyka,
No, not yet. I’m quite busy with other stuff but I hope I will have some time in the near future to update. I might create a github repo too.
Hello,
Sorry for noob question, but I’m unable to use the gallery, because I get error .mosewheel is not a function.
Any help?
Hi,
In order to use the plugin you have to include the mousewheel plugin created by Brandon Aaron. You can download it from here: http://www.marcelljusztin.com/stuff/reel-gallery/js/jquery.mousewheel.js
Hope that helps.
very noob question, but i’m know almost nothing about web sites.
i just want create small page for my photos.
how to use this?
Hi Oleg,
About.com (http://webdesign.about.com/cs/beginninghtml/ht/htbasicwebpage.htm) has a nice tutorial on how to build a website. Also feel free to email me if you need any help along the way. Thanks for stopping by.
Well, a comment is not enough to make you a web expert
I’ll right away snatch your rss feed as I can’t to find your e-mail subscription link or newsletter service. Do you have any? Please permit me recognize in order that I could subscribe. Thanks.
Hey Amie, I don’t have a newsletter service unfortunately. Follow me on twitter if you wish to be updated. Thanks.
Pingback: WordPress Arena: A Blog for WordPress Developers, Designers and Blogger
Hi,
You demo links don’t work