Make jQuery Facebox loading screen auto-center

I’ve been using the jQuery Facebox dialog plugin in a couple of my projects and one thing that annoys me by default is the loading screen appears at an arbitrary position on the page and then becomes centered after the content has loaded; it’s the moving after load I find messy. This post has a simple change that needs to be made to the Facebox code so it auto-centers the loading dialog.

Grey out a webpage

When showing an inline popup in a webpage (as opposed to a popup window) it is nice to grey out the background a little to highlight that the user should now interact with the popup rather than the webpage. This post shows how to do the necessary HTML and CSS to achieve this and tomorrow’s post will look at implementing the greyed out background with the jQuery Facebox plug-in.

Trimming strings with Javascript

Javascript does not have built-in functions to trim strings so they need to be defined either by using a Javascript framework/library such as jQuery which includes a trim function or to define trim functions yourself. This post shows how to create trim() ltrim() and rtrim() functions.