I am trying to check if a fancybox has been loaded already. If so then I run an ajax script to put content inside.
If not I open a fancybox iframe and it fetches content
I made it work with below code:
if(typeof $.fancybox == 'function') { fancy box loaded; } else { fancy box not loaded; }