• The FancyBox API lists a number of handlers to enable hooks for javascript functions.
    I need to pause some background video when opening a fancybox, but the closest I can get is using an anchor trigger (which won’t restart the video after Fancybox closes, obviously).
    Are these (or the v2 ones: beforeShow, afterShow, etc) handlers available? I can’t seem to get them to work…

    $('a.fancybox-youtube').fancybox({
            onStart: function() {
                return window.confirm('Continue?');
            },
            onCancel: function() {
                alert('Canceled!');
            },
            onComplete: function() {
                alert('Completed!');
            },
            onCleanup: function() {
                return window.confirm('Close?');
            },
            onClosed: function() {
                alert('Closed!');
            }
        });

  • The topic ‘Handlers for onStart, onComplete etc’ is closed to new replies.