Feb 22, 2009 6
Facebox Extended.
I was looking for a lightbox like control which is easy to customize.
Landed on a excellent control “facebox“. As we needed some additional functionality in addition to the ones available I have made some enhancements to it.
Create Modal Window
Clicking on the overlay layer or the Esc key will not close the window, forcing the user to respond to the popup window.
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({modal:true})
});
Switch off footer
Does not display the footer div on the popup.
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({footer:''})
});
Replace the content of the window.
This addition allows you to replace the content of the loaded Facebox window with a new content. Quite handy if you want to display response of a form submit from within the modal window.
$.facebox.content(<new_content>);
//Example.,
$.get('http://www.domainname.com/form/submit/url.php', 'params', function(data){$.facebox.content(data)})
Hope these changes will be helpfull for some one.
Download the modified version : Facebox Extended