Awayken.com

Baby Loader

About

As the birth of my son, Ian, quickly progressed, the metaphor of a progress bar seemed all too appropriate. Thus I began work on the Baby Loader, a simple JavaScript to show to the world just how long before your little one shows up to change your life.

Usage

Include baby.js somewhere in your document, and then create your babies.

The BABY function takes an object which sets the baby's duedate and gender. duedate can be a string or a Date object. If no duedate is passed in, the script uses 40 weeks from now (which isn't useful unless you never refresh your page). gender is a string that can be 'boy' or 'girl'. gender sets the color of the progress bar, and the default is a gender-neutral green.

<script src="baby.js"></script> <script> new BABY({ duedate: '4/30/2010', gender: 'boy' }); </script>

Code

This project is available on Github.com. Browse the Baby-Loader project.

Demo

Wanna see it? Visit the demo page or look below.