ImgWheel

overview settings demos download

overview

WHAT IT IS

The Essentials

responsive center focused adjustable endless extensible

ImgWheel is... Responsive

ImgWheel has a responsive display. Images and the slideshow container are resized on window resize events. Unlike with a lot of image slider plugins, images included in the ImgWheel slideshow always retain their original aspect ratio within the display.

ImgWheel is... Center Focused

The center image in the ImgWheel slideshow has some special properties. If additional content is included in the display, the content linked to each slideshow image will be displayed when that image is central. If slideshow images are wrapped in anchor tags (<a>), the associated links will only be active when an image is in the center position in the slideshow.

ImgWheel is... Adjustable

There are a number of built-in options and CSS classes that you can alter when using ImgWheel, including the event that triggers the animation (click, hover, or touch), the display width, and the animation speed.

ImgWheel is... Endless

At least 5 images need to be included in a slideshow for ImgWheel to function properly. Include as many images beyond 5 as you like... they will get looped through endlessly.

ImgWheel is... Extensible

You have the option to include content related to the slideshow images that becomes a part of the slideshow. This content could be something like an image caption or title, an article or blog entry, or whatever you might want. The content related to the central image will be displayed.

What is ImgWheel?

ImgWheel is an animated, endless, responsive slideshow that has the capability to display content related to your slideshow images as they appear. It has several options for how images are scrolled through, direction, speed, vertical alignment of images, and placement of the related content. Hover over either side of the display above to learn more about what ImgWheel is...

HOW TO USE IT

The HTML

The HTML

The first step in including ImgWheel on your site is to set up the HTML for your slideshow. All of the HTML for ImgWheel should go inside of a <div> with an assigned id or class. Within this <div> is placed a <div> with class="image-container". In this <div> go your images. The HTML for a basic slideshow would look like this:

<div id="my-slideshow">
  <div class="image-container">
	<img src="yourImage_1.jpg" />
	<img src="yourImage_2.jpg" />
	<img src="yourImage_3.jpg" />
	<img src="yourImage_4.jpg" />
	<img src="yourImage_5.jpg" />
	<img src="yourImage_6.jpg" />
	<img src="yourImage_7.jpg" />
	<!--Include as many images as you'd like!-->
  </div>
</div>

If you want to include additional content to be displayed as part of the ImgWheel slideshow, now is your chance. Simply add in another <div> with the class="article-container". Within this <div>, place as many <article>'s as there are images in your .image-container <div>, then fill those <article>'s with whatever content you like. When the first image in your .image-container <div> is central in the slideshow, the first article in your .article-container <div> will be displayed, and so on. The HTML looks like this:

<div id="my-slideshow">
  <div class="image-container">
	<img src="Image_1.jpg" />
	<img src="Image_2.jpg" />
	<img src="Image_3.jpg" />
	<img src="Image_4.jpg" />
	<img src="Image_5.jpg" />
	<!--Include as many images as you'd like!-->
  </div>
  <div class="article-container">
	<article><!--Content displayed when Image_1.jpg is central--></article>
	<article><!--Content displayed when Image_2.jpg is central--></article>
	<article><!--Content displayed when Image_3.jpg is central--></article>
	<article><!--Content displayed when Image_4.jpg is central--></article>
	<article><!--Content displayed when Image_5.jpg is central--></article>
	<!--Include as many articles as there are images in the .image-container-->
  </div>
</div>

Static content can also be included within the ImgWheel display. To have static content displayed alongside your rotating articles, add in another <div> containing this content:

<div id="my-slideshow">
  <div class="image-container">
	<img src="Image_1.jpg" />
	<img src="Image_2.jpg" />
	<img src="Image_3.jpg" />
	<img src="Image_4.jpg" />
	<img src="Image_5.jpg" />
	<!--Include as many images as you'd like!-->
  </div>
  <div class="article-container">
	<article><!--Content displayed when Image_1.jpg is central--></article>
	<article><!--Content displayed when Image_2.jpg is central--></article>
	<article><!--Content displayed when Image_3.jpg is central--></article>
	<article><!--Content displayed when Image_4.jpg is central--></article>
	<article><!--Content displayed when Image_5.jpg is central--></article>
	<!--Include as many articles as there are images in the .image-container-->
  </div>
  <div class="static-content"><!--Identify this div however you'd like-->
	<!--Insert whatever static content you'd like displayed-->
  </div>
</div>

The JavaScript

The JavaScript

You need to download and save the jquery.ImgWheel.min.js file in your project or site directory. To use ImgWheel, link to this file in your HTML <head>. If you haven't done so already, also link to a version of jQuery (version 1.6 or later). You can link to jQuery via Google without downloading the library into your project directory:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script src="jquery.ImgWheel.min.js"></script>

With the jQuery library and ImgWheel loaded on your page, you can now access the ImgWheel() function for use on page elements. Using the HTML in the previous example, we can apply the function to a div on our page like so:

$('#my-slideshow').ImgWheel();

This would be included either in your page's main JavaScript file or right in your site's <head> tags. Options to be included when invoking the function are discussed in the Settings section!

settings

OPTIONS

Settings

Settings

To see what the various settings look like when manipulated, check out the Demos section.

Setting Default Options Description
displayWidth '100%' Any display width can be used. This is the width of the entire ImgWheel display, which includes the slideshow and any other related content below the slideshow but within the targeted <div>. Relative sizing allows for responsiveness, whereas switching to a fixed width (in px) will negate this functionality.
animateSpeedMax 500 Any animation speed can be specified. Should be a value less than or equal to animateSpeedMin. The fastest speed (shortest length of time) of the animated transition from one image to the next. Animation speed is equal to animateSpeedMax when the user's mouse is at the far end of the image container. Speed is in milliseconds.
animateSpeedMin 2000 Any animation speed can be specified. Should be a value less than or equal to animateSpeedMax. The slowest speed (longest length of time) of the animated transition from one image to the next. Animation speed is equal to animateSpeedMin when the user's mouse triggers is closest to the center of the image container. Speed is in milliseconds.
delayMax 500 Any animation delay time can be specified. Must be greater than or equal to animateSpeedMax. The duration that each image (and the related content) is displayed while the ImgWheel is in motion, i.e. being hovered over. This essentially sets the pause of the central image before it is animated to the next slot in the display when the animation is moving at its highest rate of speed. The pause is the difference between delayMax and animateSpeedMax. For instance, if delayMax is set to 800 and animateSpeedMax is set to 500, the pause on the central image during hovering will be 300 milliseconds when the user's cursor is at an extreme end of the image container. If the 'click' functionality is enabled (see below), this setting is irrelevant.
delayMin 2000 Any animation delay time can be specified. Must be greater than or equal to animateSpeedMin. The duration that each image (and the related content) is displayed while the ImgWheel is in motion, i.e. being hovered over. This essentially sets the pause of the central image before it is animated to the next slot in the display when the animation is moving at its lowest speed. The pause is the difference between delayMin and animateSpeedMin. For instance, if delayMin is set to 2200 and animateSpeedMin is set to 2000, the pause on the central image during hovering will be 200 milliseconds when the user's cursor is near the center of the image container. If the 'click' functionality is enabled (see below), this setting is irrelevant.
imgPlacement 'center' 'center', 'top', or 'bottom' The vertical alignment of the images included in the slideshow display.
direction '' '' or 'reverse' Controls the direction that the images will animate in. By default, images move to the right when hovering or clicking on the left side of the display. Using 'reverse' will cause images to move to the left when hovering or clicking on the left side of the display.
functionality '' '' or 'click' The slideshow animation is triggered by hover or touch (when available) by default. Switching to 'click' causes directional arrows to appear when hovering over the display... clicking these arrows triggers one step of the slideshow scrolling. The speed of the transition animation when click is enabled is set using animateSpeedMax, so is 500 milliseconds by default.
articleWidth '100%' Any article width can be specified. This is the width of associated article display. It is set relative to the displayWidth. For example, if displayWidth is set to 70% and articleWidth is set to 50%, the article width will be 50% of the display width and 35% of the parent container width. This width is responsive. Again, specifying a fixed width negates this responsiveness.
articleAlignment 'center' 'center', 'left', or 'right' The articles in the .article-container <div> are centered by default, regardless of their specified width. They can also be aligned to the left or right of the container.

CSS STYLING

The Built-in Classes

The Built-in Classes

ImgWheel comes with two built in CSS classes. These two classes are added and removed as part of the scrolling function. They allow you to manipulate how the central image and the other images in the slideshow look.

.onlyCentral

The .onlyCentral class is applied to the central image in the slideshow display. You might want to add a border or filter to this center image. Style away in your CSS!

.everythingBut

The .everythingBut class is applied to every image in the slideshow display except for the central image. Maybe you want these other images to be blurred, have limited opacity, or be in black and white. Apply whatever style you want to this class in your CSS file.

Add Your Own!

Go CSS Crazy

Of course, you can add in any CSS styling you want on your own. The only classes that you need to apply yourself in the HTML are to the .image-container and the optional .article-container <div>'s. The only style specifications you will want to steer clear of are altering the dimensions of the display and the alignment of the articles (use the ImgWheel settings to do this!).

demos

THE BASICS

ImgWheel Default Settings


Description

This is the ImgWheel plugin in it's most basic implementation. Scrolling is controlled by hovering over either side of the image display. The width of the display is set to 100% by default. The display and image sizes are responsive. If images included in the .image-container div are enclosed in an anchor tag, that link will only be active when an image is in the central position.

Example JavaScript Code
$('#my-slideshow').ImgWheel();

Default Settings

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Setting the Display Size


Description

When relative widths are used to size an ImgWheel container (i.e. width specified as a percent) the size of the images will change responsively when the browser window is resized. If a fixed width is used, this responsiveness is lost. The first container's displayWidth setting is set to '50%', while the second container's displayWidth is set to '400px'. Resize your browser window to see the difference.

Example JavaScript Code
$('#my-slideshow_1').ImgWheel({displayWidth: '50%'});
$('#my-slideshow_2').ImgWheel({displayWidth: '400px'});

Setting the Display Size

Proportional, responsive width

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Fixed width

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Scroll Animation Speed Settings


Description

Four properties combine to control the speed of the scrolling animation. The animation speed settings (animateSpeedMax and animateSpeedMin) set how fast an image will transition from one position to the next. This is the time that the images are 'in motion'. The reason there are two settings, a max and a min, is that the speed will change based on the user's mouse position. When the user mouses toward the outside of the display, the speed throttles up toward the maximum setting; when the mouse moves in toward the middle of the display, the speed decreases toward the minimum setting. You are setting the range of possible animation speeds when you specify these two properties. That being said, if you don't want the animation to vary speed depending on cursor position, set the maximum and minimum equal to each other (as shown in the first example to the right).

The animation delay settings (delayMax and delayMin) control the total time it takes for one cycle of the transition animation to take place. The delay time encompasses the animation time, so in order for ImgWheel to work the specified delays must be equal to or greater than the specified animation times. Time for the minimum delay in excess of the animateSpeedMin setting will equal the time that an image pauses before moving onto the next position in the animation. Same with the maximum delay and the animateSpeedMax setting. In other words, if you set animateSpeedMin equal to delayMin, the images will not pause in a given location before moving on to the next location when the animation is moving at its slowest speed (when the user's cursor is near to the center of the display).

Confused yet? This is getting to be like trying to fly a toy helicopter! Don't worry, this is the only semi-complicated thing about ImgWheel. Take a look at the examples on the right and the sample JavaScript corresponding to each below

Example JavaScript Code
$('#my-slideshow_1').ImgWheel({animateSpeedMax: 1000, animateSpeedMin: 1000, delayMax: 1400, delayMin: 1400});

$('my-slideshow_2').ImgWheel({animateSpeedMax: 400, animateSpeedMin: 400, delayMax: 500, delayMin: 1750});

$('#my-slideshow_3').ImgWheel({animateSpeedMax: 200, animateSpeedMin: 3000, delayMax: 1000, delayMin: 3000});

Scroll Animation Speed Settings

One speed and one delay, regardless of cursor position

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

One speed, variable delay

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Variable speed, variable delay

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Vertical Alignment of Images


Description

The images in the scroll are vertically centered by default. This can be changed with the imgPlacement setting. Alternative options are 'top' or 'bottom'.

Example JavaScript Code
$('my-slideshow').ImgWheel({imgPlacement: 'bottom'});

Vertical Alignment of Images

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Direction of Scrolling


Description

When hovering on the left side of the display, the images will scroll to the right by default. This direction can be changed by setting direction to 'reverse'.

Example JavaScript Code
$('my-slideshow').ImgWheel({direction: 'reverse'});

Direction of Scrolling

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Changing the Animation Trigger


Description

There are two options for triggering the scrolling. The default is hovering on either side of the container (or touching either side of the container if touch is enabled on the user's device). The trigger can be changed to clicking by setting functionality to 'click'. When this setting is changed, hovering over the display shows directional arrows to either side. Clicking an arrow will cause the scroll to occur in the direction indicated. Again, the direction of this scroll is controlled with direction.

Example JavaScript Code
$('my-slideshow').ImgWheel({functionality: 'click'});

Changing the Animation Trigger

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

APPLY SOME STYLE

Using the ImgWheel CSS Classes


Description

The images in the scrolling display can be styled with CSS just as you would any other image. But what if you want your central image to display differently from other images in the container? This can be controlled by styling the .everythingBut and .onlyCentral classes in your CSS file. As the names imply, the .everythingBut class is applied to any image in the scroll that is not currently the central image. The .onlyCentral class is applied only to the central image in the display. For instance, here the .everythingBut class is styled to have reduced opacity and the invert filter applied. The .onlyCentral class is styled to include a 1px, black border. If you want to include different styling for these classes for multiple instances of ImgWheel on one page, use the appropriate CSS selection techniques.

Example JavaScript Code
$('my-slideshow').ImgWheel();
Example CSS Code
.onlyCentral {
  border: 1px solid black;
}
.everythingBut {
  opacity: .6;
  filter: invert(100%);
}

Using the ImgWheel Built-in Classes

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

GET OTHER CONTENT IN THERE

Display Related Content


Description

While the ImgWheel Plugin image scrolling is responsive and handy, what makes ImgWheel a little different from a lot of other carousel plugins is the ability to include a rotation of related content below the image display. Content related to an image will be displayed when that image is central in the container. This content could be as simple as a photo caption or as complicated as you like. Or you could leave this part out altogether. Up to you.

If you want to display related content, here's how it works. Make a second div within the tags that ImgWheel is targeting, and give it the class "article-container". Place as many <article>'s in this div as there are images in your .image-container div. Then add whatever content you want to each article. You can go style-crazy on the related content in your CSS file. Here it is with the default settings:

Example JavaScript Code
$('my-slideshow').ImgWheel();

Display Related Content

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Blue Sun

This is an indelible hand crack at Indian Creek. Make your way out to the Way Rambo Wall to check it out if you have the chance!

Cave Route

A harder-than-it-looks dihedral climb at Battle of the Bulge Buttress. Perfect for when the rain (or the sun) is pounding down.

The Fracture

A short, perfectly fractured finger crack at Sugarloaf, above Kyburz, CA. The crux is distinct and slippery!

On the Lamb

A unique horizontal route in the beautiful setting of Tuolumne. On Lamb Dome.

Matthes Crest

Perfect knife-edge ridge traversing that seems to go on and on, yet still leaves you wanting more. Great views of the Tuolumne backcountry.

Third Pillar of Dana

Beautiful granite pillar perched just to the east of the Sierra Crest, above Mono Lake in California. Fun climbing with an unforgettable last pitch.

Scarface

Perhaps the most picturesque of Indian Creek routes? The climbing isn't bad, either...

Traveler Buttress

One of the two "50 Classic" climbs located at Lover's Leap, in the vicinity of South Lake Tahoe, CA.

Size and Position the Related Content


Description

The related content can be styled any way you like in your CSS file. To control the horizontal alignment and the width of this display, however, use the ImgWheel articleAlignment and articleWidth settings. This will ensure that the positioning of the related content, its width and height, and the height of the entire ImgWheel display will all be responsively resized on window resizing events. The articleAlignment setting has three options, 'center', 'left', or 'right', and is set to 'center' by default. This is the horizontal alignment with respect to the ImgWheel container. The articleWidth setting is 100% of the ImgWheel display by default. To keep the width responsive, the articleWidth should only be set using a percentage measure. Here the article container has its width set to 60% and its alignment set to the right.

Example JavaScript Code
$('my-slideshow').ImgWheel({articleWidth: '60%', articleAlignment: 'right'});

Positioning Related Content

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Blue Sun

This is an indelible hand crack at Indian Creek. Make your way out to the Way Rambo Wall to check it out if you have the chance!

Cave Route

A harder-than-it-looks dihedral climb at Battle of the Bulge Buttress. Perfect for when the rain (or the sun) is pounding down.

The Fracture

A short, perfectly fractured finger crack at Sugarloaf, above Kyburz, CA. The crux is distinct and slippery!

On the Lamb

A unique horizontal route in the beautiful setting of Tuolumne. On Lamb Dome.

Matthes Crest

Perfect knife-edge ridge traversing that seems to go on and on, yet still leaves you wanting more. Great views of the Tuolumne backcountry.

Third Pillar of Dana

Beautiful granite pillar perched just to the east of the Sierra Crest, above Mono Lake in California. Fun climbing with an unforgettable last pitch.

Scarface

Perhaps the most picturesque of Indian Creek routes? The climbing isn't bad, either...

Traveler Buttress

One of the two "50 Classic" climbs located at Lover's Leap, in the vicinity of South Lake Tahoe, CA.

Include Static Content in the Display


Description

What if you want to include some kind of static sidebar or display description in your ImgWheel display alongside of the dynamically-displayed related content? Go for it! The ImgWheel plugin is set-up to size its display based not only on <article>'s included in the .article-container div, but also on the heights of any other div's included in the div targeted by ImgWheel. These div's would be placed in the targeted div. Vertical placement is automatically set for display below the image container, even with the related content display. Width and horizontal alignment can be set in your CSS file. Here the static content has been placed in a div with id of "static-content". The div is set to 35% width and is placed on the right. The articles are aligned to the left with width 60%.

Example JavaScript
$('my-slideshow').ImgWheel({articleWidth: '60%', articleAlignment: 'left'});
Example CSS
#static-content {
  position: absolute;
  width: 35%;
  right: 0px;
  border: 1px solid black;
  margin-top: 15px;
}

Displaying Static Content

Blue Sun Cave Route Fracture On the Lamb Matthes Crest Third Pillar Scarface Traveler Buttress

Blue Sun

This is an indelible hand crack at Indian Creek. Make your way out to the Way Rambo Wall to check it out if you have the chance!

Cave Route

A harder-than-it-looks dihedral climb at Battle of the Bulge Buttress. Perfect for when the rain (or the sun) is pounding down.

The Fracture

A short, perfectly fractured finger crack at Sugarloaf, above Kyburz, CA. The crux is distinct and slippery!

On the Lamb

A unique horizontal route in the beautiful setting of Tuolumne. On Lamb Dome.

Matthes Crest

Perfect knife-edge ridge traversing that seems to go on and on, yet still leaves you wanting more. Great views of the Tuolumne backcountry.

Third Pillar of Dana

Beautiful granite pillar perched just to the east of the Sierra Crest, above Mono Lake in California. Fun climbing with an unforgettable last pitch.

Scarface

Perhaps the most picturesque of Indian Creek routes? The climbing isn't bad, either...

Traveler Buttress

One of the two "50 Classic" climbs located at Lover's Leap, in the vicinity of South Lake Tahoe, CA.

DISCLAIMER

Rock climbing is dangerous. ImgWheel does not endorse climbing as a recreational activity. Just kidding!