Gift Wrapping Javascript !! :: Updated


Holiday Season is back here, and I made a couple of changes in the GiftWrapping JS code that I had earlier written on the request of a friend. The image now is bigger and the gift sits better in the gift wrap.

Here is how it looks now. If you are still having problems aligning the gift to the wrapper, just tweak a little with the GiftWrapper.js. In the file, you have a structure called GiftWrapper.wrapperImage. The image defines the closed animation images along with the top, left, width and height CSS styles of the gift image. Tweak this to get the perfect alignment.
If you don't see the animation on clicking the "open gift" first time but works the second time, it means that the animation completes before the image is completly loaded and rendered. If you see this problem, just load the images using the new Image() tag, so that it will be cached in the browser.

As always, you can use this for both commercial and non-commercial uses, with no liabilities on the author.