{% else-1 %}
Падающие снежинки на jQuery.

                        
<script type="text/javascript">
window.onload=function(){snow(1);}

function snow(id){
var png_sh=Math.floor(Math.random()*5)+1;
var pos_x=Math.floor(Math.random()*98)+1;
var step=Math.floor(Math.random()*30)-15;

var end_x=pos_x+step;
var img="<img id='snow_"+id+"' style='left:"+pos_x+"%; top:-10%; position:fixed;'
src='image/snow/flake"+png_sh+".gif'>";
$("#snow").append(img);
move_show(id,end_x);
id++;
setTimeout("snow("+id+");",150);
}
function move_show(id,end_x){
$("#snow_"+id).animate({top:"120%",left:""+end_x+"%"},20000,function(){
$("#snow_"+id).empty().remove();
});
}
</script>
0 22 0
0

Нет фото
Gluk91 * 0.11
• 30 мар 2014, 13:18


25 марта...как раз в тему...