A Pen by Ben Grosser on CodePen.
Created
December 8, 2013 07:14
-
-
Save bengrosser/7854240 to your computer and use it in GitHub Desktop.
A Pen by Ben Grosser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
<div class="slideshow"> | |
<img src="http://bengrosser.com/share/344/cycle1.png" width="851" height="315"> | |
<img src="http://bengrosser.com/share/344/cycle2.png" width="851" height="315"> | |
<img src="http://bengrosser.com/share/344/cycle3.png" width="851" height="315"> | |
<img src="http://bengrosser.com/share/344/cycle4.png" width="851" height="315"> | |
<img src="http://bengrosser.com/share/344/cycle5.png" width="851" height="315"> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* when the HTML page is fully loaded */ | |
$(document).ready(function() { | |
/* find a tag w/ class 'slideshow' and apply | |
the cycle effect to it with the following | |
options | |
*/ | |
$('.slideshow').cycle({ | |
fx:'fade', /* type of transition */ | |
timeout: 3000, /* time between transitions */ | |
pause:1, /* allows mouse hover to pause */ | |
speed: 800 /* how fast to transition */ | |
}); | |
}); | |
/* | |
try these alternate 'fx' values | |
blindZ | |
cover | |
growY | |
scrollUp (Down/Right/Left) | |
shuffle | |
toss | |
wipe | |
(see the full list of fx options here: | |
http://jquery.malsup.com/cycle/browser.html) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#container { | |
margin:auto; | |
width:851px; | |
margin-top:20px; | |
} | |
.slideshow img { | |
padding:15px; | |
border:1px solid #ccc; | |
background-color:#eee; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment