Fortes


Introducing the Dynamic Layout Library

Midtown Manhattan

Midtown Manhattan New York, New York

Note: This library is no longer available. Just use CSS media queries, they’re universal and don’t require JavaScript. The original post is below, but the links have been removed.

I’m happy to introduce version 1.0 of my Dynamic Layout JavaScript library.

Dynamic Layout is a simple library that allows you to easily adjust page layout based on the current browser width.

The script works by modifying the class property on the body element, adding a new class name that will look something like bw-1000, where 1000 is one of the numbers in a predefined list of possible browser widths.

Unless you’re reading this in your RSS reader, you can see a live demo by resizing your browser window. I’ve also created a simple multi-column demo, which will display one, two, or three columns depending on your browser width.

To download, and for details, see the Dynamic Layout project page.