Download
User Rating: 0/5 ( 0 votes)
jQuery Wipe is a simple jQuery CSS Slideshow for wiping between frames.
Features:
-
Works with responsive content
-
It doesn’t care about the content; can contain images, videos, text, etc.
-
Works on Chrome, Safari, iOS, Android Chrome, IE10
-
Uses CSS3 transitions
-
Older browsers will still see the slides advance at the interval (tested in IE9)
-
Works best when all of the slides have the same height
Source: github.com
1. INCLUDE JS FILES
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery.wipe.js"></script>
2. HTML
<a href="#" class="prev">Prev</a>
<a href="#" class="next">Next</a>
<ul id="slideshow" class="slides">
<li><img src="https://31.media.tumblr.com/09e35644c4d31a09ced4525bb9a2f33b/tumblr_n7os355Dfm1qz6f9yo7_r1_500.png" /></li>
<li><img src="https://31.media.tumblr.com/fd81384196550fb0f57d912acc178728/tumblr_n7oqut2kIA1qz6f9yo1_500.jpg" /></li>
<li><img src="https://31.media.tumblr.com/22bfddec03884732e34ab1a93384e594/tumblr_n7oog2kaVV1qz6f9yo2_500.jpg" /></li>
</ul>
3. JAVASCRIPT
$(document).ready(function() {
var slideshow;
slideshow = $('#slideshow').wipe();
$('.prev').click(function(event) {
event.preventDefault();
slideshow.prev();
});
$('.next').click(function(event) {
event.preventDefault();
slideshow.next();
});
});
4. CSS
.slides {
position: relative;
}
.slides>li {
position: absolute;
top: 0;
left: 0;
width: 400px;
height: 250px;
overflow: hidden;
}
.slides>li>img {
width: 100%;
}
5. OPTIONS
var opts = {
//-- Class name that is added to the current visible slide:
currentSlideSelector: 'wipeCurrentSlide',
//-- How long the slide transition is, in milliseconds:
transitionSpeed: 1000,
//-- How long a slide is paused for, in milliseconds:
pauseTime: 2000,
//-- Called when slide appears, returns the slide $el:
onSlideAdd: function() {},
//-- Called after the slide hides, returns the slide $el:
onSlideRemove: function() {}
}
6. METHODS
//-- Advance to the next slide
next()
//-- Pause the slideshow; hit start() to resume.
pause()
//-- Retreat to the previous slide
prev()
//-- Starts the slideshow
// Hits the next() function at the specified interval
start()
//-- Stops the slides from animating, and unbinds the attached events.
// Useful in single page backbone apps, where you need to remove
// and destroy things without causing a memory leak.
terminate()