Auto Start/Open

5,845 views
Skip to first unread message

a.l...@talkwebsolutions.co.uk

unread,
Mar 2, 2009, 5:51:12 AM3/2/09
to fancybox
I've been using Fancy Box for a while and it's a really great
product.

I have a project where i need fancy box to auto open onLoad. Can that
be done, or does it only work of links?

Any Help out there?


Many Thanks

Janis

unread,
Mar 2, 2009, 11:41:03 AM3/2/09
to fancybox
Hi,
Currently it`s not possible, as alternative, you could create hidden
link and trigger click event on page load.

Janis

Le Bigot Guillaume

unread,
Mar 2, 2009, 11:46:12 AM3/2/09
to fanc...@googlegroups.com
Ok !

About the trigger click, could you post me a quick example of code, or an action list steps by steps of what you imagine ?
I ma not sure about the process...You wanted to use an addEventListener on link-click in order to launch FB ?

Thx


2009/3/2 Janis <janis.s...@gmail.com>



--
Guillaume Le Bigot

zeojex

unread,
Mar 2, 2009, 12:14:02 PM3/2/09
to fancybox
Excuse me, i don't use Google Group a lot and i answer to all
responses i get on my Gmail, thinking it was for me !! Sorry sorry !!


On 2 mar, 17:46, Le Bigot Guillaume <guillaume.lebi...@gmail.com>
wrote:
> Ok !
>
> About the trigger click, could you post me a quick example of code, or an
> action list steps by steps of what you imagine ?
> I ma not sure about the process...You wanted to use an addEventListener on
> link-click in order to launch FB ?
>
> Thx
>
> 2009/3/2 Janis <janis.skarne...@gmail.com>

Janis

unread,
Mar 3, 2009, 2:53:41 AM3/3/09
to fancybox
Quick example:

<a id="autostart" style="display:none" href="#inline"></a>


...


$("#autostart").fancybox().trigger('click');

a.l...@talkwebsolutions.co.uk

unread,
Mar 3, 2009, 6:48:16 AM3/3/09
to fancybox
Awesome, that's got it.

Many Thanks.

Derek

unread,
Mar 21, 2009, 1:09:26 PM3/21/09
to fancybox
@a.lloyd

how did you get that to work exactly?
I can't seem to get the autostart to fire.




On Mar 3, 6:48 am, "a.ll...@talkwebsolutions.co.uk"

a.l...@talkwebsolutions.co.uk

unread,
Mar 23, 2009, 5:32:45 AM3/23/09
to fancybox
@Derek

<a id="autostart" href="[page you want to show]"></a>

<script type="text/javascript">

$(document).ready(function() {
$("#autostart").fancybox({'overlayShow':true,frameWidth:
838,frameHeight:540}).trigger('click');
});
</script>

i have that in the body, the document ready part is essential.


Alex

J.R. Saucedo

unread,
Jul 9, 2012, 1:25:01 PM7/9/12
to fanc...@googlegroups.com
I tried to use that code and then appeared a  message that it can't load it, why?

JFK

unread,
Jul 9, 2012, 3:34:05 PM7/9/12
to FancyBox
who knows?
you may have a js error, but hard to say without a link

J.R. Saucedo

unread,
Jul 9, 2012, 9:53:39 PM7/9/12
to fanc...@googlegroups.com
When I call a html, pdf, php file, it doesnt work. But when I try with a jpg or png, it works. Some idea?

JFK

unread,
Jul 10, 2012, 3:08:17 AM7/10/12
to FancyBox
I guess you should read carefully http://fancybox.net/blog No. 6 ...
and check all the options for fancybox v1.3.4 here http://fancybox.net/api
Maybe your problem is that you are copying a code written in 2009 for
a very old version of fancybox and the API options may have changed
Reply all
Reply to author
Forward
0 new messages