Hmm. I'm getting closer. Thanks for the direction. Here's where I'm
at:
function getIndex(title, currentArray, currentIndex, currentOpts) {
var current = currentIndex;
var end = currentArray.length - 1;
if (current == end) {
alert("last image loaded")
$(this).click(function() {
alert("last image clicked")
});
return false;
}
}
$("a[rel=quick_look]").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'centerOnScroll' : true,
'cyclic' : true,
'titleFormat' : getIndex
});
$("li.quick-look a").click(function() {
$("a#quick-first[rel=quick_look]").trigger('click');
return false;
});
The first alert "last image loaded" is firing as the last image
loads. That's a good thing. But how do I go about setting it up so
when last image is clicked, it fires that other alert "last image
clicked"? Basically, I just want to people able to click on the last
image, have the slideshow close and redirect user to another URL. I
can add that all to the click function there, but I can't seem to get
the click function to fire. Any ideas?
Tom
On Jan 7, 1:13 pm, JFK <
jfk.d...@gmail.com> wrote:
> you may build a jQuery function that compares the currentIndex against
> the currentArray.length and when it is bigger or equal to it, fires
> your alert
> then set that function in the onComplete option
>
> you use those values to build a formatted title like "image 1/ 3" for
> instance
> see the
> $("a[rel=example_group]").fancybox({ ....
> example here for referencehttp://
fancybox.net/js/web.js