views:

18

answers:

1

Hi, iam using facebox 1.1 and i want the facebox to load when the body loads, instead of clicking on the anchor tag with rel=facebox.

Can anyone tell me how to achieve it ?

+1  A: 

Have you read the documentation? It is described there under Controlling Facebox Programmatically. Ok, it is facebox 1.2, I don't know if this is available in 1.1 but I think so.

E.g.:

$(function(){
    $.facebox({ div: '#box' });
});
Felix Kling
Thanks for your reply, but i tried it already, it doesn't work.Attach It onLoadWhile calling facebox() on any anchor tag will do the trick, it's easier to give your Faceboxy links a rel="facebox" and hit them all onLoad.jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox()})Perhaps it works only with 1.2 version.
dskanth
@dskanth: Maybe. Sorry. Works for me.
Felix Kling
@felix wonderful you simply rock.. i was dying for months to find this...
Pandiya Chendur