Fancy Box Autoclose...
Hi there, taking a bit of a shot in the dark here but does anyone use Fancy Box? - http://fancy.klade.lv/home
I have a requirement to auto close a Fancy Box instance, there is some code that you're supposed to be able to use for an onclick event -
I basically need to execute this but not as an onclick, it needs to trigger automatically at the desired point.
Bit of a long shot I know but if anyone has any experience of this would appreciate any input.
Have you tried calling the function whenever? Sounds like a fairly easy thing to do. It says on the website that you need to call it onClick, but I doubt it is limited to clicks only.
Nothing happens - I guess it's not as simple as this, but I seems like something you should be able to do.
$(this).html('Question sent successfully, thank you.').addClass('messageboxok').fadeTo(900,1,
Might be easier to just debug what you have? Is it live somewhere to see if it throws any errors? The function works fine when called pretty much anywhere... haven't tested it in certain scenarios, but eh... didn't think they would be required anyway.
The answer turns out to be
This correctly closes the modal window :thumbsup: