Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Tom’s Excellent Javascript Snow

Behold: Tom’s Excellent Javascript Snow: unobtrusive and customisable javascript snow for web pages using no images! If you’re looking at this directly, rather than through an RSS aggregator, you should see it falling now. Unless, that is, you’re watching this on Dave, in which case it will be some time past Christmas and I might have taken the snow away again. However, it always snowing at Tom’s Excellent Javascript Snow page!

I’ve been meaning to write this since last year when my attempts were full of fail. The idea was to create simple unobstrusive javascript snow that could be added to any page and that didn’t require any images. I think Tom’s Excellent Javascript Snow fulfills these criteria and is therefore full of win. Furthermore, it is very customisable, so you can easily alter the amount, speed, and style of snow, and so forth. Incidentally, it uses the asterisk character (*) by default. There is in fact a Unicode Tight Trifoliate Snowflake character, but it is only available in a few fonts by the looks of it and I haven’t tried it. The script depends on the DOM and kind of uses CSS, but it is all defined through the Javascript: so many of the properties are different for individual snowflakes or change while the script is running, that it is not worth having a general style. It also means you only need one file to do everything.

To use it, copy tomsnow_v1.js to a directory on your web-server, and add the following code to the head of any pages on which you would like snow:

<script type=”text/javascript” src=”http://www.yourdomain.com/path/tomsnow_v1.js”></script>
<script type=”text/javascript”>
function init () {
snow();
}
window.onload=init;
</script>

I’m sure Stuart will tell me there’s a better way of doing it…

I know this works on Firefox 2 and Internet Explorer 6 on Windows as well as Firefox 3 on Linux.

In the unlikely event you do use this, do let me know for the sake of my own vanity. Any comments generally are welcome. I do have some ideas for version 2, maybe for next year, mostly around wind effects such as better horizontal drifting, prevailing winds, and gusts. Ideally, I would like to make the snow lay in some way, as in the snow at St Pancras (you might have to wait for it to kick in), but that is quite unlikely given the trouble I had with page heights as it was.

9 comments to Tom’s Excellent Javascript Snow

  • The capacities of 8, 12, roofing baltimore maryland 16, and
    20 quarts ensure you always have the right size pot for stews, soups, chili, and more.
    Hoffritz 4 Piece Nesting Aluminum Stockpot Set with Lids – This Hoffritz 4 Piece Nesting Aluminum Stockpot Set is perfect for preparing big family dinners,
    holiday meals, and large cookouts. The capacities of 8, 12, 16,
    and 20 quarts ensure you always have the right size pot for stews, soups,
    chili, and more.

  • Greetings! Very useful advice within this article!
    It’s the little changes that will make the greatest changes.
    Thanks a lot for sharing!

  • We’re a bunch of volunteers and starting a
    new scheme in our community. Your site provided us with
    valuable info to work on. You’ve done an impressive activity and our whole community
    shall be grateful to you.

  • I love your blog.. very nice colors & theme. Did you
    make this website yourself or did you hire someone to do it for you?
    Plz respond as I’m looking to create my own blog and would like to find
    out where u got this from. appreciate it

  • Hey! I know this is kinda off topic but I was wondering which blog platform are you using for this website?
    I’m getting sick and tired of WordPress because I’ve had problems with hackers and I’m looking at options for another platform.
    I would be great if you could point me in the direction of a good platform.

  • Spot on with this write-up, I honestly believe that this web site needs
    a great deal more attention. I’ll probably be back again to read through more, thanks for
    the advice!

  • Mel

    Having read this I thought it was rather enlightening.
    I appreciate you finding the time and energy to put this content together.
    I once again find myself spending way too much
    time both reading and commenting. But so what, it was still worth it!

  • ?????? ????????? ?.?. (?????).

    ??????? ????????? ?/?

    ???????? ?????????? ?? ???????? ? ???.
    ???????? ??? ?????????? ?? ?????.

    ????????? ??????? ? ????????, ????????????? ???
    ???????? ????? ?????????? ?.?.

    ??? ???? ????????????? ? ??????? ??????? ????????????? ??????????????: Audi, BMW, Chevrolet, Chrysler, Citroen, FIAT,
    Ford, Honda, Hyundai, Iveco, Jeep, KIA, Land Rover, Lexus, MAN, Mazda,
    Mercedes, Mitsubishi, Nissan, Opel, Peugeot, Porsche,
    Renault, Rover, SAAB, Scania, Seat, Skoda, Subaru, Toyota, Volvo ? ??.
    ?? ????????? ???????? ???
    ??????????? ????? ???????? ? ??????????? ???????????? ?????????? ?/?
    (??????? ?/?). ?? ?????? ??????????? ?????????, ???????????
    ? ????? ????????.

  • Thats not all, you can even conquer the small castles by goodgame empire hack password download banding together with other players and this can be a great chance
    to build alliances with other empires. As a fledgling lord, you will need to master
    the art of timely tax collection. To maximize your Coin income, you will need a bit of a helping hand.

    Stop by my web-site; goodgame empire hack v1.1 free download (Donny)