Somethinghitme

My Code, demos and ideas.

Jquery Snowfall Plugin 1.4

Thursday, Dec 9, 2010

Newer version available

 

Added a few new things, you can now make flakes rounded (Thanks Luke), and give them shadows (for lighter colored pages) - thanks for the idea Yutt. Also I fixed some bugs that cause horizontal bar flickering (I hope).

Download Jquery Snowfall 1.4

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 
    };