Last active
August 29, 2015 14:24
-
-
Save j-cam/3cd45a521486ecc22956 to your computer and use it in GitHub Desktop.
Script for setting slideshow options and adding arrow key functionality for photo set pages.
This file contains hidden or 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
<!-- START SLIDE FUNCTIONALITY --> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script src="/storage/js/slides.jquery.js"></script> | |
<script> | |
$(function () { | |
$('#slides').slides({ | |
preload: true, | |
preloadImage: '/storage/js/loading.jpg', | |
autoHeight: true, | |
autoHeightSpeed: 350, | |
generateNextPrev: false, | |
generatePagination: false, | |
bigTarget: true, | |
play: 0, | |
pause: 3500, | |
hoverPause: false, | |
effect: 'fade', | |
fadeSpeed: 1, | |
crossfade: true | |
}); | |
}); | |
$(document).keydown(function (e) { | |
if (e.keyCode === 37) { | |
$('a.prev').trigger('click'); | |
} else if (e.keyCode === 39) { | |
$('a.next').trigger('click'); | |
} | |
}); | |
</script> | |
<!-- END SLIDE FUNTIONALITY --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions
Here is the full photo set template for future use: JR Photo Set Template