Tuesday, May 29, 2007

Draggable 2

I finally realize that the previous draggable version can be scary. The gadgets will jump out all of a sudden after ALL of them are loaded, which can be very slow depending on the external "application". In this peaceful version, the gadgets appear in the order they are found in the webpage.

To use, copy the code from the last post to one of the first html/javascript page elements in blogger. Enclose anything you want to drag with the <div> tag:

<div id="some_unique_name">
your gadget codes

<script> blogTools.init("some_unique_name"); </script>

and add the last <script> line to where you want to start rendering. It can be placed as the first line of the <div> tag. Or you can collect them all to put together in some place, to retain the dramatic effect.

I didn't write a lot of the codes. This version is rewritten to not interfere with anything else in your webpage. The only global parameters are BlogTools and blogTools. FF2 and IE7 compatible.

No comments: