javascriptFancyBox how can I close active fancybox when link is clicked and open another fancybox

I already have this to close the active fancybox:


added to my link.

Question : how can I open another fancybox content when that link is clicked?

Say: I have the login form open via fancybox. There is a link which says: Do not have an account. So if that link is clicked I want to load registration form and close login form. What is best practice to do this?

Thank you.

There seem to be a few other questions around on this subject.
This one for example:
How do I open one Fancybox after another closes?

Another and simpler way to do it without using callbacks here:

Actually that covers the latest 1.3.x version of fancybox while the other question/answer was written for a much older version.

Related Articles
You Might Also Like