{"id":7369,"date":"2009-12-02T08:17:45","date_gmt":"2009-12-02T08:17:45","guid":{"rendered":"https:\/\/www.amitbhawani.com\/blog\/?p=7369"},"modified":"2009-12-02T08:18:04","modified_gmt":"2009-12-02T08:18:04","slug":"falling-snow-effect-for-christmas","status":"publish","type":"post","link":"https:\/\/www.amitbhawani.com\/blog\/falling-snow-effect-for-christmas\/","title":{"rendered":"Falling Snow Effect for Christmas Javascript Codes"},"content":{"rendered":"<p>Christmas is nearby and you would be looking to test out a new <a href=\"https:\/\/www.amitbhawani.com\/blog\/best-free-christmas-wordpress-themes-download\/\">christmas wordpress theme<\/a> or else some different effects which would be a new blog header, background or falling snow which falls from the top of the screen towards the status bar. Last year we had written about a <a href=\"https:\/\/www.amitbhawani.com\/blog\/christmas-special-snowfall-plugin-falling-snow-on-your-blog\/\">Christmas Snowfall Plugin<\/a> which seems to be not available now, which is the reason iam going to refer you to a new effect code which can be easily implemented.<\/p>\n<p>This Javascript based snowmaker is quite good because it loads the font types which look like snowflake images and does not actually require you to host any images and load them which can be bandwidth consuming too. Just add the following code anywhere after the &lt;body&gt; Tag on your theme files or near the footer of your blog.<\/p>\n<p><code>&lt;script&gt;<br \/>\n\/\/ CREDITS: \/\/ Snowmaker Copyright (c) 2003 Peter Gehrig. All rights reserved.<br \/>\n\/\/ Distributed by http:\/\/www.hypergurl.com \/\/ Permission given to use the script<br \/>\non webpages provided that this notice remains as is. \/\/ Set the number of snowflakes<br \/>\n(more than 30 - 40 not recommended) var snowmax=35 \/\/ Set the colors for the snow.<br \/>\nAdd as many colors as you like var snowcolor=new Array(&quot;#aaaacc&quot;,&quot;#ddddFF&quot;,&quot;#ccccDD&quot;)<br \/>\n\/\/ Set the fonts, that create the snowflakes. Add as many fonts as you like var<br \/>\nsnowtype=new Array(&quot;Arial Black&quot;,&quot;Arial Narrow&quot;,&quot;Times&quot;,&quot;Comic<br \/>\nSans MS&quot;) \/\/ Set the letter that creates your snowflake (recommended:*) var<br \/>\nsnowletter=&quot;*&quot; \/\/ Set the speed of sinking (recommended values range<br \/>\nfrom 0.3 to 2) var sinkspeed=0.6 \/\/ Set the maximal-size of your snowflaxes var<br \/>\nsnowmaxsize=22 \/\/ Set the minimal-size of your snowflaxes var snowminsize=8 \/\/<br \/>\nSet the snowing-zone \/\/ Set 1 for all-over-snowing, set 2 for left-side-snowing<br \/>\n\/\/ Set 3 for center-snowing, set 4 for right-side-snowing var snowingzone=3 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\n\/\/ CONFIGURATION ENDS HERE \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\n\/\/ Do not edit below this line var snow=new Array() var marginbottom var marginright<br \/>\nvar timer var i_snow=0 var x_mv=new Array(); var crds=new Array(); var lftrght=new<br \/>\nArray(); var browserinfos=navigator.userAgent var ie5=document.all&amp;&amp;document.getElementById&amp;&amp;!browserinfos.match(\/Opera\/)<br \/>\nvar ns6=document.getElementById&amp;&amp;!document.all var opera=browserinfos.match(\/Opera\/)<br \/>\nvar browserok=ie5||ns6||opera function randommaker(range) { rand=Math.floor(range*Math.random())<br \/>\nreturn rand } function initsnow() { if (ie5 || opera) { marginbottom = document.body.clientHeight<br \/>\nmarginright = document.body.clientWidth } else if (ns6) { marginbottom = window.innerHeight<br \/>\nmarginright = window.innerWidth } var snowsizerange=snowmaxsize-snowminsize for<br \/>\n(i=0;i&lt;=snowmax;i  ) { crds[i] = 0; lftrght[i] = Math.random()*15; x_mv[i]<br \/>\n= 0.03   Math.random()\/10; snow[i]=document.getElementById(&quot;s&quot; i) snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]<br \/>\nsnow[i].size=randommaker(snowsizerange) snowminsize snow[i].style.fontSize=snow[i].size<br \/>\nsnow[i].style.color=snowcolor[randommaker(snowcolor.length)] snow[i].sink=sinkspeed*snow[i].size\/5<br \/>\nif (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2)<br \/>\n{snow[i].posx=randommaker(marginright\/2-snow[i].size)} if (snowingzone==3) {snow[i].posx=randommaker(marginright\/2-snow[i].size) marginright\/4}<br \/>\nif (snowingzone==4) {snow[i].posx=randommaker(marginright\/2-snow[i].size) marginright\/2}<br \/>\nsnow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size) snow[i].style.left=snow[i].posx<br \/>\nsnow[i].style.top=snow[i].posy } movesnow() } function movesnow() { for (i=0;i&lt;=snowmax;i  )<br \/>\n{ crds[i]  = x_mv[i]; snow[i].posy =snow[i].sink snow[i].style.left=snow[i].posx lftrght[i]*Math.sin(crds[i]);<br \/>\nsnow[i].style.top=snow[i].posy if (snow[i].posy&gt;=marginbottom-2*snow[i].size<br \/>\n|| parseInt(snow[i].style.left)&gt;(marginright-3*lftrght[i])){ if (snowingzone==1)<br \/>\n{snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2) {snow[i].posx=randommaker(marginright\/2-snow[i].size)}<br \/>\nif (snowingzone==3) {snow[i].posx=randommaker(marginright\/2-snow[i].size) marginright\/4}<br \/>\nif (snowingzone==4) {snow[i].posx=randommaker(marginright\/2-snow[i].size) marginright\/2}<br \/>\nsnow[i].posy=0 } } var timer=setTimeout(&quot;movesnow()&quot;,50) } for (i=0;i&lt;=snowmax;i  )<br \/>\n{ document.write(&quot;&lt;span id=&#39;s&quot; i &quot;&#39; style=&#39;position:absolute;top:-&quot; snowmaxsize &quot;&#39;&gt;&quot; snowletter &quot;&lt;\/span&gt;&quot;)<br \/>\n} if (browserok) { window.onload=initsnow } &lt;\/script&gt; <\/code><\/p>\n<p>Thats it you will start seeing some excellent snow flakes falling on your screen when you visit your blog url, also works on most latest web browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Christmas is nearby and you would be looking to test out a new christmas wordpress theme or else some different effects which would be a new blog header, background or falling snow which falls from the top of the screen towards the status bar. Last year we had written about a Christmas Snowfall Plugin which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[970],"tags":[],"class_list":{"0":"post-7369","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-web-blogging","7":"entry"},"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":283,"url":"https:\/\/www.amitbhawani.com\/blog\/christmas-special-snowfall-plugin-falling-snow-on-your-blog\/","url_meta":{"origin":7369,"position":0},"title":"Christmas Special Snowfall Plugin Falling Snow on your Blog","author":"Amit Bhawani","date":"December 23, 2007","format":false,"excerpt":"Here comes christmas and you would have already activated the Christmas Wordpress Themes which would give your blog a beautiful christmas theme and you can run it till the New Year. Here is a Plugin which offers another Christmas effect on your blog named as the Christmas Snowfall Plugin, which\u2026","rel":"","context":"In &quot;Wordpress Guide&quot;","block_context":{"text":"Wordpress Guide","link":"https:\/\/www.amitbhawani.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":238,"url":"https:\/\/www.amitbhawani.com\/blog\/best-free-christmas-wordpress-themes-download\/","url_meta":{"origin":7369,"position":1},"title":"Top 6 Christmas WordPress Themes for this Season","author":"Amit Bhawani","date":"December 9, 2007","format":false,"excerpt":"The christmas season is near and everyone of you would be looking to change your blogs design for a week's time to a christmas theme of your choice which would attract your website's visitors. There are several christmas themes which include just a small header santa claus image and some\u2026","rel":"","context":"In &quot;Wordpress Guide&quot;","block_context":{"text":"Wordpress Guide","link":"https:\/\/www.amitbhawani.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/blog\/wp-content\/uploads\/2010\/12\/christmas-blogolog-wordpress-theme.gif?fit=406%2C273&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2432,"url":"https:\/\/www.amitbhawani.com\/blog\/beautiful-christmas-wallpapers\/","url_meta":{"origin":7369,"position":2},"title":"Beautiful Christmas Wallpapers Collection","author":"Amit Bhawani","date":"December 3, 2008","format":false,"excerpt":"Christmas is coming soon and iam sure you are looking to get into the christmas theme by setting up christmas wallpapers on your desktop, redesigning your blogs with christmas wordpress themes and also setting up blogs\/websites on christmas like the one iam working on ie Christmas Wow. You can also\u2026","rel":"","context":"In &quot;Free Stuff&quot;","block_context":{"text":"Free Stuff","link":"https:\/\/www.amitbhawani.com\/blog\/category\/free-stuff\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/blog\/wp-content\/uploads\/2010\/12\/Christmas-Wallpapers1.jpg?fit=516%2C329&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":285,"url":"https:\/\/www.amitbhawani.com\/blog\/christmas-holiday-doodle-from-google-for-happy-holidays\/","url_meta":{"origin":7369,"position":3},"title":"Christmas Holiday Doodle from Google for Happy Holidays","author":"Amit Bhawani","date":"December 24, 2007","format":false,"excerpt":"Did you check out these Holiday Logo's from Google on the search homepage today? They represent the holiday season in holiday theme with some beautiful logo's. Here is the complete list of this year's holiday logo's from Google! You can find the complete list of Holiday Logo's from Google here","rel":"","context":"In &quot;Google&quot;","block_context":{"text":"Google","link":"https:\/\/www.amitbhawani.com\/blog\/category\/google\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2421,"url":"https:\/\/www.amitbhawani.com\/blog\/best-blogspot-themes-templates\/","url_meta":{"origin":7369,"position":4},"title":"Best of the Best BlogSpot Themes \/ Templates","author":"Amit Bhawani","date":"December 2, 2008","format":false,"excerpt":"I dont use Blogspot blogs now because they cannot be used for long term purpose, but still its good for new bloggers who are looking to develop small blogs and make some amount of money from this. Blogger.com offers you with some templates in the 'Create New Blog' section which\u2026","rel":"","context":"In &quot;Top Lists&quot;","block_context":{"text":"Top Lists","link":"https:\/\/www.amitbhawani.com\/blog\/category\/top-lists\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/blog\/wp-content\/uploads\/2010\/12\/visionary-reloaded-theme.png?fit=312%2C218&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3957,"url":"https:\/\/www.amitbhawani.com\/blog\/auto-shrink-posted-images\/","url_meta":{"origin":7369,"position":5},"title":"Auto Shrink Posted Images to Maximum Theme Width","author":"Amit Bhawani","date":"April 29, 2009","format":false,"excerpt":"If you are using wordpress blogs, then you are familiar with the default theme which is a theme full of features, though its not liked by many because of the looks. In the Default Wordpress theme whenever you upload any images of any width , they are automatically resized to\u2026","rel":"","context":"In &quot;Wordpress Guide&quot;","block_context":{"text":"Wordpress Guide","link":"https:\/\/www.amitbhawani.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts\/7369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/comments?post=7369"}],"version-history":[{"count":0,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts\/7369\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/media?parent=7369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/categories?post=7369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/tags?post=7369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}