Spawn Sticker

JS Web SI16

A script that let you add stickers on top of HTML elements. To make it works just add a data-sticker attribute to your element. The content of the sticker will be the value of the attribute.

<div data-sticker='Hello'>World</div>
This script was used for the SI16 - Learning how to walk while cat-walking website. This is a simplified version. In the original one we had to deal with fixed elements (such as the header / nav of the pages) as well as relative ones. So the code there is a bit messier, but this one here it's simple and clean.

How does it work

The code it's composed of 3 main functions: one to create the sticker, one to spawn and attach it to an element, and a last one to limit the amount of stickers spawned at once.

propper documentation coming sooon