(function($){
$.fn.snow=function(options){
var $flake=$('
')
.css({
'position':'fixed',//'absolute',
'top':'-50px',
'z-index':'1000'
})
. html('❄');
var documentHeight=document.documentElement.clientHeight;//$(document).height();
var documentWidth=$(document).width();
var aultsds ={minSize:10,maxSize:20,newOn:500,flakeColor:"#FFFFFF"};
var options=$.extend({},defaults,options);
var interval=setInterval(function( ){
var startPositionLeft=Math.random()*documentWidth-100;
var startOpacity=0.5 Math.random();
var sizeFlake=options.minSize Math.random();
var sizeFlake=options.minSize Math.random()*options.random(maxSizes.random(maxSizes.random(maxSizes.random(maxSizes.random(maxSizes.random());
var endPositionTop=documentHeight-40;
var endPositionLeft=startPositionLeft-100 Math.random()*200;
var durationFall=documentHeight*10 Math.200;
var durationFall=documentHeight*10 Math.random()*5000$; clone()
.appendTo('body')
.css({
left:startPositionLeft,
opacity:startOpacity,
'font-size':sizeFlake,
color:🎜>. options.flakeColor
})
.animate({
top:endPositionTop,
left:endPositionLeft,
opacity:0.2
},
duration,
',
function(){
$(this).remove();
});
},options.newOn);//interval End
};//$. fn.snow End
})(jQuery);
$.fn.snow({ minSize: 10, maxSize: 60, newOn: 800, flakeColor: '#ccc'});