Skip to content

Instantly share code, notes, and snippets.

@albell albell/markup.html
Created Mar 15, 2013

Embed
What would you like to do?
<div id="myshow" class="cycle-slideshow" data-cycle-pager="#pager-container">
<img src="img1.jpg"/>
<img src="img2.jpg"/>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" data-img="img3.jpg"/>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" data-img="img4.jpg"/>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" data-img="img5.jpg"/>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" data-img="img6.jpg"/>
</div>
<div id="pager-container"></div>
$(document).ready(function(){
$('#myshow').on( 'cycle-before', function(e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
nextImg = $('#bigshow img').eq(optionHash.nextSlide + 1);
if ( nextImg.attr("src") == "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="){
nextImg.attr("src", nextImg.attr("data-img"));
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.