Using Fancybox version 2 supplied by http://fancyapps.com/fancybox/#support
I want to open a fancybox from my main page, but within that 1st fancy box a second fancy
You could create two scripts, one for each link
so in the main
page you have:
1st Fancy Box
Notice that class is now fancybox1
... then the script tha fires the first fancybox.
$(".fancybox1").fancybox();
Inside 1stFancyBox.html
you can have this link
2nd FancyBox
Notice that class is now fancybox2
Also in the main
page add the script that fires the second fancybox (from within the first fancybox):
$(".fancybox2").fancybox({
afterClose: function(){
$(".fancybox1").trigger("click");
}
});
The script above will fire the first fancybox after closing the second fancybox regardless the content of 2ndFancyBox.html
.
UPDATE: I added a DEMO here