Lightweight Background Slideshow Plugin with jQuery and CSS3 - pureSlider

File Size: 1.38 MB
Views Total: 5463
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Lightweight Background Slideshow Plugin with jQuery and CSS3 - pureSlider

pureSlider is a small and simple jQuery / Zepto background image slider plugin that utilizes CSS3 transitions and transforms for subtle image zoom transition effects.

How to use it:

1. Place jQuery / Zepto library and the jQuery pureSlider plugin in your web page.

<script src="jquery.min.js"></script>
<!-- or zepto.js -->
<script src="pureSlider.js"></script>

2. The html structure to build a background image slider.

<div class="container">
  <div class="slide" style="background-image: url('1.jpg')">This is slide One</div>
  <div class="slide" style="background-image: url('2.jpg')">This is slide Two</div>
  <div class="slide" style="background-image: url('3.jpg')">This is slide Three</div>
  <div class="slide" style="background-image: url('4.jpg')">This is slide Four</div>
  <div class="ns-next"></div>
  <div class="ns-prev"></div>

3. Initialize the plugin.


4. Add the basic CSS styles to the background image slider.

.container {
  display: block;
  position: relative;
  top: 33%;
  width: 100%;
  padding-bottom: 33%;
  border: none;
  overflow: hidden;

.slide {
  transition: 500ms ease all;
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(2);
} {
  transform: scale(1);
  opacity: 1;
  top: 0;
  transition: 500ms ease all;

.ns-prev {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  background-color: rgba(0,0,0,.65);

.ns-next {
  right: 25px;
  z-index: 10;

.ns-prev {
  left: 25px;
  z-index: 10;

5. Available options with default values.


// animation speed
animDuration:  500,

// transition delay
slideDuration:  2500,

// CSS selectors
slideNode: 'div.slide',
nextButton: '.ns-next',
prevButton: '.ns-prev',
activeClass: 'active',

// Show "Left", "Right" navigation
showNavigation: false


Change logs:



  • Fixed Active class is set twice on consecutive slides


  • Fixed transition


  • Code refactoring, removal of navigation for less that two slides.


  • Don't crash when there are no slides on stage


  • Fix for Opera 12


  • Fixes and class name change


  • Z-index handling removal, new 'activaded' state.

This awesome jQuery plugin is developed by Every0ne. For more Advanced Usages, please check the demo page or visit the official website.