Make jQuery Facebox dialog modal

The jQuery Facebox lightbox can be closed by clicking the close button, clicking anywhere outside the dialog or using the escape key. This post shows how to make the dialog modal so that the only way to close it is by clicking the close button. You could alternatively add a link etc into the content of the dialog which would close it, link to another page etc.

jQuery Facebox: setting the width

I’ve been looking at the jQuery Facebox plugin recently which is a Facebook style lightbox for loading remote content, images, local content etc. In this post I look at how to change the width of the Facebox dialog with CSS or programatically using Javascript.

jQuery: Get the vertical mid point of the browser’s window

jQuery’s $(window).height() and $(window).scrollTop() can be used to calculate the vertical mid point of a browser’s window. This quick post shows how to do this and then tomorrow’s post will look at vertically centering a Facebox dialog in the middle of the window using this method.

jQuery Facebox Basic Example

The jQuery Facebox plugin creates a Facebook like lightbox which can be used to load external pages, images or put in any content you want. It’s not perfect but it works pretty well. This post shows a basic example and the html for a page skeleton which uses Facebox. I’m posting this now because I’ll have some additional posts in the next few days using Facebox (and also some older ones here here and here).