Thanks but no luck. If I replace the next block
Code:
$('#next').click(function(){
var next = current + 1;
if (next > total) next = total;
if (current != total) {
$('#pic' + current).fadeOut('slow');
$('#pic' + next).fadeIn('slow');
current = next;
setHeight(current)
$('#number').html(current + ' of ' + total)
}
return false;
});
with your code I get a script error http://www.visibilityinherit.com/projects/error.JPG. If I add it after the next block I get the same error.
Code:
$('#next').click(function(){
var next = current + 1;
if (next > total) next = total;
if (current != total) {
$('#pic' + current).fadeOut('slow');
$('#pic' + next).fadeIn('slow');
current = next;
setHeight(current)
$('#number').html(current + ' of ' + total)
}
return false;
});
$('#next').click(function(){
var next = current + 1;
if (next > total){
next = total;
}
if (current !== total) {
$('#pic' + next).fadeIn('slow', function(){
$('#pic' + current).hide(); //hide the current pic after the next one is shown
});
current = next;
setHeight(current);
$('#number').html(current + ' of ' + total);
}
return false;
});
Bookmarks