TweenBox @ Drinking Rockstars and Programming Back to WillJessup.com

TweenBox

Tweenbox is not ready for the world yet - fixing some bugs and will release it

Straight to it, try these demo's

Launch tweenbox w/ "shadow" styling
Launch tweenbox w/ default style
Launch Image Gallery


Why tweenBox?

tweenBox was written because I wanted a way to show multiple pages and content within a thickbox. As I began looking over the code I realized that I may as well re-write the entire thing so the code base would be well structured and allow easy modifications in the future to add on any type of additional functionality in a sensible fashion.

Tweenbox Allows you to "tween" between multiple pages , each loaded via ajax. The example i've set forth is between a login and register page, which seems like the most probable execution of this script. TweenBox grabs the dimensions of the content automatically, so no settings are required for tweenbox to know what size it needs to be, although you can set these manually. TweenBox also features a Tween-Gallery where you can load in an array of images from JSON (via ajax) and view them within the box.

Updates

9/4/06 - finished up first version of tweenbox due to some bug fixes in jQuery core and published

8/24/06 - started workign on this again due to jQuery scource code updates which should have fixed some bugs. moving alot of the functionality into the $.tweenbox namespace . Adding a decoration type function which allows one to create customized layouts and such for the tweenbox, if they so wish - an example is called "shadow" and of course there is the default.

7/25 - Started working on slide-show gallery.

7/20 - restyled box, added speed parameter & default. Added checks for parameters and defaults.

Bugs

nothing major right now

create your own style

The basic style of tweenBox is as simple as it gets; the overlay, box and close div's. But, you can create your own styles by just adding in functions within the $.tweenbox.decorator namespace and calling them in the link url , such as href="site.php?decorate=shadow&height ...

Documentation

The basics

Just download the package which includes tweenbox.js , jquery.js and a few HTML files i've setup as an example and put these on a server. In order to initialize a thickbox, all you need to do is add class="tweenbox" to your A link, then add whichever options you want, such as

<a href="login.htm?decorate=shadow&height=500&amp;width=300" class="tweenbox">this opens tweenbox to login.htm</a> Availiable Options, all are part of the URL string:

DownLoad tweenBox

get the ZIP here

Contributors

code by Will Jessup
using jQuery by John Resig
inspired by thickbox by Codey Lindley