Delay when showing fancybox on load.

937 views
Skip to first unread message

Robbert Vervuurt

unread,
Jun 27, 2011, 5:08:18 AM6/27/11
to fancybox
Hi there!

I started using Fancybox today, after spending hours and hours finding
a lightbox Javascript code that was easy enough for me (a beginner) to
implement, so the lightbox opened on load.

I asked for a solution on getsatisfaction, where Benjamin Lupton
directed me to his newest project called Fancybox.

It works like a charm! After only 1 hour of fiddling with everything,
I understand how it works and it also shows on load! Awesome!

There is just one thing: It shows directly, even before the rest of
the page is loaded. Is there a way to put in a 5 seconds delay before
it shows?

Thanks! Awesome project :D

JFK

unread,
Jun 28, 2011, 3:31:28 PM6/28/11
to fancybox
Hi there

I am assuming that you want to load fancybox automatically after,
let's say, five seconds?
if so, this example script would do the trick:

setTimeout( function() {$('.fancylink').fancybox().trigger('click'); },
5000);
of course, assuming that you have somewhere in your document:
<a class="fancylink" href="images/01.jpg"></a>

on the other hand, just a point of clarification about what you said:
"...Benjamin Lupton directed me to his newest project called Fancybox"

I want to think that there is a misunderstanding here since fancybox
IS NOT a Benjamin Lupton's project but a Copyrighted (c) project of
Janis Skarnelis
if such Benjamin Lupton is claiming elsewhere that fancybox is his
project then he is wrong (somebody should sue him)

On Jun 27, 2:08 am, Robbert Vervuurt <robbertvervu...@gmail.com>
wrote:

balupton

unread,
Aug 19, 2011, 11:48:55 AM8/19/11
to fanc...@googlegroups.com
Definitely a misunderstanding somewhere ;)

Fancybox rocks, as such I often recommend it to people who request support for my own jQuery lightbox project as typically fancybox suits there needs much better than my lightbox would.

So yeah, no suing necessary ;)

balupton

unread,
Aug 19, 2011, 11:48:59 AM8/19/11
to fanc...@googlegroups.com

JFK

unread,
Aug 19, 2011, 12:06:50 PM8/19/11
to fancybox
good to know
thanks for coming by
Reply all
Reply to author
Forward
0 new messages