Mike,
Thanks for this. I did find a solution by setting a flag for the first
time through the cycle since there were other things too I wanted to
happen only on the first time through. After the #title element is shown,
I simply replaced its html with a different image and content. A stripped
down version looks something like this:
jQuery(document).ready(function($){
var firstTime = true;
$('#cycle').cycle({
fx:'fade',
speed:1500,
timeout:7000,
delay: 5000,
before: doBefore
});
function doBefore() {
if (firstTime == true){
var i = $(.slide).index(this);
if (i == 1){
$(#title).html(img src='newimage.jpg' / + div
class='caption'foobar/div);
firstTime = false;
};
};
};
});
This seems to work. I gather setting such a global variable is regarded as
bad form, but in such a small application it seemed harmless. Your
solution seems to avoids this.
Thanks again, and thanks too for your generosity in developing this very
generally useful plugin.
Jon
On Sun, 30 Aug 2009, Mike Alsup wrote:
Is there a way to replace the first slide in a running slideshow such
that it's shown only once??
Here's an example of something similar - might give you some ideas:
http://www.malsup.com/jquery/cycle/title.html