Somethinghitme

Code, demos and ideas.

Jquery Snowfall Plugin 1.3

April 30, 2010

Plugin has been updated to 1.4 please go here for more up to date information

*Updated* fixed a bug, and added an example file to show how to use the plugin.

Added a few new things to the Jquery snowfall plugin, you now have the ability to clear the snow from elements, chaining is supported, and element matching is supported. Its funny today was the hottest day of the year so far and I decided to work on a script to make it snow.

Download Jquery Snowfall 1.3.1

Invoking the snow

[sourcecode language=“js”] $(document).snowfall(); $(‘#elementid’).snowfall({flakeCount : 100, maxSpeed : 10}); $(‘.class’).snowfall({flakeCount : 100, maxSpeed : 10}); [/sourcecode]

Snowfall Methods

[sourcecode language=“js”] // stopping the snow $(document).snowfall(‘clear’); $(‘#elementid’).snowfall(‘clear’); $(‘.class’).snowfall(‘clear’); [/sourcecode]

Options currently supported with default values

[sourcecode language=“js”] options = { flakeCount : 35, // number flakeColor : ‘#ffffff’, // string flakeIndex: 999999, // number minSize : 1, // number maxSize : 3, // number minSpeed : 2, // number maxSpeed : 3 // number }; [/sourcecode]

Example


Written by Jason Brown Father, Veteran, lover of everything tech.