Delos Chang
Delos Chang

Reputation: 1853

Fancybox v2 No Hide on Overlay Click - How?

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?

Upvotes: 0

Views: 6453

Answers (2)

ruinobreferreira
ruinobreferreira

Reputation: 90

Try the following.

helpers : { 
  overlay : {closeClick: false}
}

Upvotes: 6

bn00d
bn00d

Reputation: 1136

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.

Upvotes: 0

Related Questions