0

Recently upgraded to Fancybox v2 and can't figure out how to keep Fancybox open when someone clicks outside of the DIV.

I tried "Overlay: null" but then the user can click around the site and navigate away..

I know in Fancybox v1 it was HideonOverlay Click... Any suggestions?

Delos Chang
  • 1,823
  • 3
  • 27
  • 47

2 Answers2

6

Try the following.

helpers : { 
  overlay : {closeClick: false}
}
jeremy
  • 9,965
  • 4
  • 39
  • 59
0

Here is a piece of code and is self explanatory, hope you will find it useful:

$('#locator').live('click', function(){
    $.fancybox({
        type: 'iframe',
        hideOnOverlayClick: false,
        scrolling: 'no',
        autoSize: true,
        href: site_url + 'home/locator',
        beforeClose: function (){
        var latlng = $(".fancybox-iframe").contents().find('input[name=latlng]').val();
            $('input[name=location]').val(latlng);
        }
    });
});

I bumped into this question while searching something and felt I would answer it.

Mihai Iorga
  • 39,330
  • 16
  • 106
  • 107
bn00d
  • 1,126
  • 3
  • 15
  • 21