Updated the snowfall plugin that was released yesterday with a few more features. The primary new feature allows you to specify which elements you want the snow to appear in. An example of this can be seen below. View a full page demonstration
$('#snow-window').snowfall({flakeCount : 100, maxSpeed : 10});
In addition to snowing within elements there are some more options available, properties available are
flakeCount,
flakeColor,
flakeIndex,
minSize,
maxSize,
minSpeed,
maxSpeed
You can still initialize the plugin with
$(document).snowfall();
but the flakes will not use fixed for positioning, they will now travel down the page completely. On some long pages this will make it seem like its not “snowing” as much. Im working on a few more updates that should be released in the following days. If you end up using this I’d love to know. You can download the most recent version here.
Tags: javascript, jquery, plugin, snow
I really enjoy you.
Thanks, just a little notice. In my IE8 horisontal scrolling escaped only after:
if(this.x > (elWidth) – 40 || this.x < 40)
ah nice, thanks. Yeah I just put an arbitrary value in there (I think 6). Ill update it to 40 and see how it performs on other browsers as well.
cool! next version with wind…
So let’s see.. if I wanted it to just snow for a time and then turn it off would I call snowfall again with a count of zero?
Very nice! How hard would it be to make it have a small transparent png falling and rotating instead of the snowflakes?
Anthony, that wont work unfortunately, but ill update the code within the week and add a stop, or clear function.
Jared, It wouldn’t be too hard, I just prefer the single pixels. Maybe ill update it and add an image option.