By Kevin Thornbloom
A responsive jQuery slideshow with beautiful panning effects.
Leaf Mountain Tree Sky

Quick Start

Download View On Github

1) Include CSS in your website's header <link rel="stylesheet" href="css/smoothslides.theme.css">
2) Add your images to a div with a class of smoothslides. Also give the div a unique ID to differentiate it from other Smoothslides on the page. You'll get better results with images that are the same size. <div class="smoothslides" id="myslideshow1"> <img src="images/1.jpg"/> <img src="images/2.jpg"/> <img src="images/3.jpg"/> <img src="images/4.jpg"/> </div>
3) Add the javascript file after you have included jQuery, preferrably in your footer. Then call the smoothslides plugin using the unique ID you gave your div. <script type="text/javascript" src="PATH-TO-JQUERY"></script> <script type="text/javascript" src="js/smoothslides-2.2.1.min.js"></script> <script type="text/javascript"> $(window).load( function() { $('#myslideshow1').smoothSlides(); }); </script>

Advanced Usage

Multiple Instances:
You may use different instances of this plugin on the same page, and each instance can have its own settings. Simply give each a unique id, and call each one seperately in the footer. <script type="text/javascript"> $(window).load( function() { $('#example-one').smoothSlides(); $('#example-two').smoothSlides(); }); </script> NEW: Specific Effects on Images: As of version 2.2.0, you can now set an image to use only a certain effect. Do this by adding a data attribute with the effect name. Make sure to spell the effect name exactly as it appears in the table below. Example: <img src="images/example2-2.jpg" alt="Pan Up" data-effect="panUp"/>
Pan Up Pan Right Zoom In
Smoothslides has several settings that can be used to customize the slideshow. The options are set when calling the plugin. End each line with a comma, except the last one. Refer to the table below for available settings. <script type="text/javascript"> $(window).load( function() { $('#myslideshow1').smoothSlides({ effectDuration: 6000, effect: 'zoomIn' /* no comma on last option */ }); }); </script>
Name Description Available Options Default
effectModifier NEW: Modifies the strength of the Ken Burns effect (amount of zoom, pan, etc) Positive numbers where 1 = no change, 2 = 100% change from original. 1.3
order NEW: Sorting order of images 'random' or 'normal' 'normal'
effectDuration Length of time in milliseconds for the effect User Specified 6000
transitionDuration Length of time in milliseconds for the fade between slides User Specified 500
autoPlay Option to automatically start playing on page load 'true' or 'false' 'true'
effect Type of panning effect used. 'crossFade' 'zoomOut' zoomIn' 'panUp' 'panDown' 'panLeft' 'panRight' 'diagTopLeftToBottomRight' 'diagTopRightToBottomLeft' 'diagBottomRightToTopLeft' 'diagBottomLeftToTopRight'
Note: You may choose a subset of effects by comma seperating such as 'zoomOut,zoomIn'.
Randomly picks from all options
effectEasing CSS easing used for effects 'ease' 'ease-in' 'ease-out' 'ease-in-out' 'linear' 'ease-in-out'
nextText Text appearing in the next button User Specified ' ►'
prevText Text appearing in the back button User Specified '◄ '
captions Whether or not to display captions using the image's alt tag 'true' or 'false' 'true'
navigation Whether or not to display previous/next buttons 'true' or 'false' 'true'
pagination Whether or not to display dots representing each slide 'true' or 'false' 'true'
matchImageSize True sets a maximum width based on your image sizes. False allows width to be greater than image size, scaling up the images. 'true' or 'false' 'true'

Selecting A Subset Of Effects:
By default, Smoothslides will randomly choose from all possible effects. If you'd like to choose from just a certain few effects, just define them in your options. effect: 'zoomIn,zoomOut,panLeft,panRight'
Custom Styling:
Smoothslides comes with a default style, but it's easy to make your own! Just edit smoothslides.theme.css to suite your needs. Check out the comments to see what's what.

Full Width:
By default, Smoothslides will only get as large as your images are. However, you can change this behaviour by setting matchImageSize to 'false'. In this mode, Smoothslides will fill the width of whatever container it is in. Images within Smoothslides will be scaled up to fill the area. Note: Operating at a larger size forces the browser to repaint more of the screen which can affect performance.

Using with Lightbox:
There is no lighbox effect included, however it's easy to add one with smoothslides. Just find your lightbox script of choice, and treat the images as you normally would with that script.

Linking Images:
Feel free to add links on your images to make them clickable.


Smoothslides uses silky smooth CSS transitions available in the following browsers:

IE Firefox Chrome Safari Opera
10+ 16+ 26+ 6.1+ 12+

Supporting Internet Explorer 9 and below: Ensure you use a 1.x version of jQuery since version 2 does not support IE8 and down. Since CSS transitions won't be available, Smoothslides will at least use jQuery animations to provide a fade in between each slide in IE9 and down.

Mobile Compatibility: Mobile support is generally very good.


Found a bug?
Head over to the Github issues page and let me know about it!

Have an idea on how to make it better?
Add a feature request on the Github issues page.

Not working?
  • Make sure you have included jQuery before Smoothslides
  • Are your paths to the css and js correct?
  • Do you have any broken images?
  • Is your code formatted correctly?

Known Issues:
  • Images do not appear if Smoothslides is hidden via display:none, and then later shown. Fix by changing maxWidth on line 272 of the JS file to your the pixel width of the images you are using.
Follow me on Twitter

Creative Commons License
Smoothslides by Kevin Thornbloom is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.