Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi, here is a working example https://www.picssel.com/playground/jquery/openFormIframeandCloseOnsubmit_02feb12.html of the code you are trying but…

    Keep in mind, this is for fancybox using iframe mode. You say you are using inline content… That would mean you do not need to call the ‘parent’ here as the source is embedded in the current frame.

    Thread Starter nef426

    (@nef426)

    Hi RavanH,

    Based off the example you provided, and getting rid of the ‘parent’ call, I tried using the following and can’t seem to get it working either –

    <a href="javascript:$.jQuery.fancybox.close();">Close Window </a>

    I looked at the code and tried using the version that was actually in use in the box:

    <a href="javascript:jQuery.fancybox.close();">Close Window</a>

    this one also wouldn’t work for me though —

    Thanks

    A test on https://demo.4visions.nl/easy-fancybox-sandbox/ tells me it should work. Do you get any javascript errors? If you have a link for me I could take a look…

    Thread Starter nef426

    (@nef426)

    Unfortunately I’m developing locally, so no link.

    I took the code you used in the auto open box @ your sandbox, and when I use that I get this error:

    jQuery.fancybox is undefined

    I get the same error with the other variations I mentioned above.

    Thread Starter nef426

    (@nef426)

    Not sure if it makes a difference, but for transitions in&out im using ‘fade’, and easing for in&out im using ‘back’

    The transition and easing settings should not matter… But keeping transition to fade (or even none) is the safest for now.

    If I understand it correctly, there is no error when the inline content is opened in FancyBox but when closing, this ‘undefined’ error occurs? Does it also occur whan clicking the X close button or clicking outside the lightbox frame to close FancyBox?

    Is there javascript inside this content that might be breaking the FancyBox script?

    In fact, the fact that the function fancybox suddenly is completely undefined (instead of just throwing an error somewhere along the line) seems to point to the main jQuery script being loaded twice. Could you check for any script files that are linked in the page source more than once, even in different versions?

    Thread Starter nef426

    (@nef426)

    ok, found it, that fixed it.

    I had a second library linked as part of https://jquery.malsup.com/cycle/ — even though that plugin says it can function with libraries 1.3.2+ it doesn’t seem to like the ver=1.7.1 that is attached, hmmm… on to the next problem.

    Thanks for your trouble shooting help.

    Thread Starter nef426

    (@nef426)

    Just incase anyone else stumbles upon this and is using the jQuery cycle plugin with easy-fancybox. I solved the double library load issue by changing the jQuery Cycle plugin to use ‘jQuery’ instead of ‘$’ per suggestion from this thread:

    https://www.ads-software.com/support/topic/jquery-cycle-plugin-and-other-jquery-issues?replies=2

    Excellent. Thanks for sharing the fix ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Easy FancyBox] Issue creating close link for inline content’ is closed to new replies.