irshad
unread,May 26, 2009, 2:28:34 AM5/26/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to facebox
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!