other autor write :
Sometimes we may require to make our facebox modal i.e do not allow
the background to be clickable when facebox is loaded.
I have one simple solution. Hope it helps you guys out there..
1.Add one parameter in settings
$.extend($.facebox, {
settings: {
opacity : 0.5,
overlay : true,
modal : true, //New parameter
........
}
2. Modify the function showOverlay()
replace the line .click(function() { $(document).trigger
('close.facebox') })
with .click(function() {
if ($.facebox.settings.modal != true)
$(document).trigger('close.facebox')
})
Make sure you set the value of opacity between 0 and 1, and the
overlay value to true.
Enjoy!
other autor write :
Sometimes we may require to make our facebox modal i.e do not allow
the background to be clickable when facebox is loaded.
I have one simple solution. Hope it helps you guys out there..
1.Add one parameter in settings
$.extend($.facebox, {
settings: {
opacity : 0.5,
overlay : true,
modal : true, //New parameter
........
}
2. Modify the function showOverlay()
replace the line .click(function() { $(document).trigger
('close.facebox') })
with .click(function() {
if ($.facebox.settings.modal != true)
$(document).trigger('close.facebox')
})
Make sure you set the value of opacity between 0 and 1, and the
overlay value to true.
Enjoy!
On Jan 13, 11:48 am, jasondavis <friendproj...@gmail.com> wrote:
In order to not edit facebox.js directly, I did like this:
//Extend facebox (As per Arka15's suggestion:
$.extend($.facebox.settings, { modal : true });
//Alter default behaviour (remove standard click behaviour, attach our
own)
$(document).bind('loading.facebox', function() {
$("#facebox_overlay").unbind("click").click(function()
{
if (!$.facebox.settings.modal) {
$(document).trigger('close.facebox');
}
})
})
Cheers for posting your solution!
Much appreciated,
Jamie
> > that somehow?- Hide quoted text -
>
> - Show quoted text -