Skip to content

Instantly share code, notes, and snippets.

@freshface
Created January 13, 2017 15:41
Show Gist options
  • Save freshface/d1bcec2446f7c479afaa9776142288c2 to your computer and use it in GitHub Desktop.
Save freshface/d1bcec2446f7c479afaa9776142288c2 to your computer and use it in GitHub Desktop.
$('.js-slideshow').each(function() {
var cycle = $(this).cycle({
slides: '> .slideshow-slide',
swipe: true
});
cycle.find('.cycle-slide').click(function(e){
cycle.cycle('next');
});
$(document.documentElement).keyup(function (e) {
if (e.keyCode == 39)
{
cycle.cycle('next');
}
if (e.keyCode == 37)
{
cycle.cycle('prev');
}
});
});
$('.js-lightbox').each(function() {
$(this).magnificPopup({
delegate: 'a',
mainClass: 'mfp-fade',
gallery: {
enabled: true, // set to true to enable gallery
preload: [0, 2]
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment