Created
May 12, 2010 02:51
-
-
Save elidupuis/398149 to your computer and use it in GitHub Desktop.
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
$('#slideshow').qCycle({ | |
toLoad: images, | |
cycleOpts: { | |
fx: 'fade', | |
timeout: 3*1000, | |
pager: '#pagers' | |
}, | |
createSlide: function (img) { | |
var data = img.data('qCycle.slideData'); | |
var slide = $('<div>').addClass('slide').append($(img).attr('alt',data.title)); | |
slide.append($('<p>').addClass('caption').text(data.title)); | |
return slide; | |
} | |
}); |
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
var images = [ | |
{ | |
title:"image two", | |
img:"http://farm4.static.flickr.com/3337/4597107633_49dc2253ef_o.jpg" | |
}, | |
{ | |
title:"image three", | |
img:"http://farm4.static.flickr.com/3358/4597108157_a90ee422a0_o.jpg" | |
}, | |
{ | |
title:"image four", | |
img:"http://farm2.static.flickr.com/1421/4597107235_50f51d464a_o.jpg" | |
}, | |
{ | |
title:"image five", | |
img:"http://farm5.static.flickr.com/4067/4597722526_6e87fd62bc_o.jpg" | |
} | |
]; |
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="slideshow"> | |
<div class="slide"> | |
<img src="http://farm2.static.flickr.com/1243/4597723386_5115429a6e_o.jpg" alt="" /> | |
<p class="caption">This is the first photo. In is defined in the HTML source.</p> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment