Somethinghitme

My Code, demos and ideas.

Snowfall 1.6

Saturday, Dec 8, 2012

Repo on Github Download Jquery Snowfall 1.6 View the plugin in action

You can now use images for snowflakes!

// jQuery vs 
$(document).snowfall({image :"image/flake.png", minSize: 10, maxSize:32});

// purejs vs 
snowFall.snow(document.body, {image : "image/flake.png", minSize: 10, maxSize:32});

Invoking the snow

 $(document).snowfall(); 
 $('#elementid').snowfall({flakeCount : 100, maxSpeed : 10}); 
 $('.class').snowfall({flakeCount : 100, maxSpeed : 10});

Snowfall Methods

 // stopping the snow 
 $(document).snowfall('clear');
 $('#elementid').snowfall('clear');
 $('.class').snowfall('clear');

Options currently supported with default values

 options = { 
    flakeCount : 35, // number 
    flakeColor : '#ffffff', // string 
    flakeIndex: 999999, // number 
    minSize : 1, // number 
    maxSize : 3, // number 
    minSpeed : 2, // number 
    maxSpeed : 3, // number 
    round : false, // bool 
    shadow : false, // bool 
    collection : 'element' // string 
};