Pages

Tuesday 30 April 2013

Add Snow Falling Effect In Blogger


Snow Falling effect is very nice and beautiful effect for your site it’ll be very nice to welcoming your visitors with a Christmas Snow Fall effect. In our today’s tutorial we’ll learn how to get this widget inside your blog / site.  In our this gadget you can control number of Falling snow in your Blog / Site. Snow Falling effect consist on corn flakes style snow which i was personally like this style. Because it through a very good impression to your visitors. So let’s start our today’s tutorial for adding a snow fall effect.




                                                   Live Demo

Add Snow Falling Effect In Blogger

  • Go To Blogger > Layout
  • Add a HTML / JavaScript Gadget
  • Paste the following code in it
<script type="text/javascript">
  //Configure below to change URL path to the snow image
  var snowsrc="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqRJtrRwiV2xoY_w75CNAqdW5YPLzd7y4j7uazUp2P8oMYACZ-2k1iDLsywsFgXffHzrU6DgOvaQD5i_xsZNyoJXmcNqE8JT27V7OR9Lgf4hwIKGl7CPoJmtSEIKXoELtosX8bmO_4Pw/s400/snow.gif"
  // Configure below to change number of snow to render
  var no = 30;
  // Configure whether snow should disappear after x seconds (0=never):
  var hidesnowtime = 0;
  // Configure how much snow should drop down before fading ("windowheight" or "pageheight")
  var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600;
  if (ns6up) {
    doc_width = self.innerWidth;
    doc_height = self.innerHeight;
  } else if (ie4up) {
    doc_width = iecompattest().clientWidth;
    doc_height = iecompattest().clientHeight;
  }
  dx = new Array();
  xp = new Array();
  yp = new Array();
  am = new Array();
  stx = new Array();
  sty = new Array();
  snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "http://2.bp.blogspot.com/-MsCdyoGtGdA/UX5gk72qNoI/AAAAAAAAAfQ/LaKTmUG-aJM/s1600/snow+falling+effect.gif" : snowsrc
  for (i = 0; i < no; ++ i) { 
    dx[i] = 0;                        // set coordinate variables
    xp[i] = Math.random()*(doc_width-50);  // set position variables
    yp[i] = Math.random()*doc_height;
    am[i] = Math.random()*20;         // set amplitude variables
    stx[i] = 0.02 + Math.random()/10; // set step variables
    sty[i] = 0.7 + Math.random();     // set step variables
        if (ie4up||ns6up) {
      if (i == 0) {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
      } else {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
      }
    }
  }
  function snowIE_NS6() {  // IE and NS6 main animation function
    doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
        doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp[i] += sty[i];
      if (yp[i] > doc_height-50) {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
      }
      dx[i] += stx[i];
      document.getElementById("dot"+i).style.top=yp[i]+"px";
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px"; 
    }
    snowtimer=setTimeout("snowIE_NS6()", 10);
  }
    function hidesnow(){
        if (window.snowtimer) clearTimeout(snowtimer)
        for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
    }
if (ie4up||ns6up){
    snowIE_NS6();
        if (hidesnowtime>0)
        setTimeout("hidesnow()", hidesnowtime*1000)
        }
</script>

  • Replace 30  to set falling snow ball numbers in your site
  • Save Your Gadget and place it anywhere you want

21 comments:

  1. Nice widget thanks a lot by

    mockbyte.blogspot.com

    ReplyDelete
  2. ive tried it on my blog but doesnt work.. followed your instructions, could it be to do with my current theme that wont allow it?

    ReplyDelete
    Replies
    1. @Memory
      Dear widget working fine may be the problem is in your template

      Delete
  3. very beautiful thanks !!!!!!!!!!!

    ReplyDelete
    Replies
    1. @Marc
      Your most welcome dear keep in touch

      Delete
  4. Thank you.
    http://yoncademirel.blogspot.com
    http://yonjademirel.blogspot.com
    http://olikia.blogspot.com

    ReplyDelete
  5. Didn't work for me either. All the other generic blogger html codes worked ok. The code showed...

    ReplyDelete
  6. I Don't Get It The Last Instructions

    ReplyDelete
  7. Thanks

    lifeoveruppacoffee.blogspot.in

    ReplyDelete
  8. thanks!!!!!!!!!!!!!!!!
    watch latest news every hour from all over the world included hollywood/bollywood just visit at that link http://www.latamangesteroldsongs.blogspot.com

    ReplyDelete
  9. Thanks, and HAPPY HOLLIDAYS TO ALL from Paris...

    http://cosmin-frisan-photography.blogspot.fr/

    ReplyDelete

 

Total Pageviews

Copyright © BW

Very Funny Videos Football Fails Compilation Spank Cam Prank Compilation Funny Videos Compilation World Most Biggest Balloon Funny Killer Clown Prank Our Christmas Tree Zalfie Christmas Movie Night Christmas Fun With Zone And Nala Fun Things To Do Christmas New Funny Clips Most Funniest Moments Best Funny Amazing Video Clips Christmas Santa Funny Snata Funny Santa Claus Funny Santa Claus Epic Fail Christmas Day Crazy Santa Christmas Information Christmas Cork Craft Ideas Christmas Com Holidays For Christmas How The Gymnast Stole Christmas Christmas Winter Activities Planning For Best Christmas Activities Jose Mari Chan Jose Mari Chan Do You Hear What I Hear Jose Mari Chan Christmas Carol Christmas Songs Jose Mari Chan Christmas In Our Hearts Christmas Songs Of Jose Mari Chan Secret The Santa Santa Ninth Reindeer About Celebrate Christmas Christmas Candy Canes Chrismon Patterns Christmas Carols Christmas Cards Christmas Eve Traditions Christmas Crackers A Santa Twas The Night Before Christmas About Shopping Mall Santa And More About Santa Claus Who Comes To New York St. Nicholas Christmas Santa About Boxing Day And Christmas Christmas Bells Xmas Why Is Christmas Day On The 25th December? Christmas Card Greetings Christmas Days Christmas Just Fun Com Christmas Party Ideas For Family Christmas Event Christmas Party Food Ideas Christmas Entertainment Hire Corporate Christmas Entertainment Ideas Christmas The Yule Log Winter Festivals During Christmas Holiday The History Of Wassailing And Mumming Christmas Trees Decoration Father Christmas Snow And Ice Easy Christmas Pudding Personalized Christmas Gifts Christmas Decorations With Poinsettia Flowers Pickle Ornament Christmas Fun Day Mince Pies On Christmas Holiday Day Fun Done Diwali Videos Christmas Fun Happy New Year New Funny Videos Comedy Videos Prank Videos News Christmas Christmas Videos Funny Santa Christmas Prank Upcomming Events Christmas Ornaments Christmas Balls History Of Christmas Day Presents For Christmas Happy Christmas Day German Christmas History Of Christmas Christmas Poems Christmas Carols Christmas Around The World Christmas Decorations Christmas Tree Christmas Present Christmas Santa Xmas Funny Happy New Year See Santa Claus Run Santa Run Santa Fun Run Santa Funny Christmas Fun Run Running Santa Santa Com Santa Fun Run Naughty Little Elf Funny Santa Christmas Prank Write Santa Track Santa Online Kids Santa Where Is Santa From Locate Santa Santa Kids Gifts From Santa Claus Santa Claus Address Santa Card Track Santa Now Santa s Home Santa For Kids Where Santa? Santa Finder Follow Santa where is santa now 2016 See Santa Find Santa Talk to Santa Claus Call Santa Claus Mobile Santa's Village Santa North Pole Where s Santa Where is Santa Now Funny Santa Day Of Christmas Celebrating Christmas Around The World Where Is Santa Now The 12 Days of Christmas Funny Video Santa Claus Prank Christmas Greetings Locate Santa Santa Christmas The Fun On Christmas Funny Prank Holiday Christmas Holiday In Christmas Christmas Holiday Christmas Fun Holidays For Christmas Fun Of Holidays Christmas Holidays Christmas Season Christmas Fun Day Christmas Entertainment Christmas Day Christmas Events Prank For Christmas Fun Jesus Prank Days Of The Year Com Special Days Of The Christmas Prank For Your Happy New Year Fun Of New Year Happy New Year Happy UPCOMING DAYS Upcoming Special Days Year Of Fun Days Of The Year Christmas Fun Day Fun Day Psycho Santa Claus Jesus Pranks Compilation Power Pranks One Year of Fun Year Of Fun Funny Days Best Funny Clip Days Of The Year Fun Holidays Funny Monkeys Year Of Fun 2017 Fat Girl Love For Fat Girl Gift For Boyfriend Days Of The Year In World Days Of The Year Com Special Days In a Year Day Holidays Funny Days Days Of The Year Special Days In a Year Days Of The Year Fun Holidays Upcoming Special Days Upcoming Days Best Fails 2017 One Year of Fun funniest Video Funny New Happy Funny Years Christmas Fun the fun 2017 Fun Done Online Entertainment Events Today Entertainment News Latest EventsIn The World Fun Video Fashion And You Hollywood Video Surprising Face like A Monkey