Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Christmas Pop-up with Countdown Timer and Falling Snow For Websites

Welcome your website visitors with falling snow and a count down timer this Christmas 2017. An easy to add jQuery pop-up for Christmas greetings that can be added to any simple webpage, WordPress blog or Blogger blog.

To keep our tradition alive, we are releasing our premium set of jQuery Pop-ups as Holiday gift to all MBT readers. This Popup plugin is specially designed and developed with Five Unique Features! It is completely customizable, has a countdown timer that can be set to any date and time, has 3 different animations, 2 attractive Christmas Background themes and most importantly it is the first popup plugin of its kind introduced for blogger blogs that comes with HTML5 sessionStorage functionality to set cookie in order to control the popup display. You can decide whether to show the popup only once to your visitors or on every new visit. It is perfectly compatible with all major browsers. Interesting part of it is that the scripts are stored on our servers so no headache  on your part thus making the installation extremely easy. You can add it easily to your blogger blog or Wordpress blog or on any webpage you may have. Lets view a Live demo first on Blogger and then on two simple webpages.

Blogger: LIVE DEMO - fadeAndPop 

Simple Webpage: DEMO 1 - fade  DEMO 2 - none

Note: The above demos show each animation style. In order to check whether cookies are stored or not, simply refresh the page and you will find that the popup doesn't appear again. We are using session cookies here. The popup will display again only if the user closes the browser and revisits your blog or if the visitor visits your blog in a new browser tab. If you want to prevent the popup from appearing again after the browser is closed, then you can use localstorage instead of session storage. All details have already been discussed on HTML5 cookies series.

Looking for a New Year Popup? Check this! Gold Plated New Year Popup

Add Christmas Pop-up to a BlogSpot blog

  1. Go to blogger > Template
  2. Backup your template
  3. Click "Edit HTML"
  4. Paste the following code just above

               

            //Hiding snowfall             $(document).ready(function()                         {                            $('a.close-reveal-modal').click(function() {$(document).snowfall('clear');});                 //Setting cookie                                if(sessionStorage.getItem("Hide-MBT-Popup") == 1) {                 $(document).snowfall('clear');                 $(document).snowfall.hide();                 $("#myModal").hide();                                 }                 sessionStorage.setItem("Hide-MBT-Popup", 1);                                 });                                                 $(function() {                         // Setting Animation                         $('#myModal').reveal({                  animation: 'fadeAndPop',                   //fade, fadeAndPop, none                  animationspeed: 300,                       //how fast animtions are                  closeonbackgroundclick: false,              //if you click background will modal close?                  dismissmodalclass: 'close-reveal-modal'    //the class of a button or element that will close an open modal             });                         //Revealing Snowfall             $(document).snowfall({deviceorientation : true, round : true, minSize: 1, maxSize:8,  flakeCount : 250});                         });                         //]]>                

You can customize almost anything in the above count from flake count till animation style but I will only discuss what is relevant in order to keep things simple:

  • Set time and date by editing : 12/25/2017 12:00 AM I have set it to default Christmas time. The demo shows time for Christmas in 2017. Just to keep the popup alive! :)
  • You can set the CountDown timer text display by editing: %%D%% days: %%H%% hrs: %%M%% mins: %%S%% secs . Make sure not to change the variables starting dn ending with %%. You can choose to display just hours/minutes/seconds or Days/hours/minutes. Edit it as you prefer.
  • Once the countdown timer reaches the target date, it will instead display some message. You can choose to write anything by replacing It is finally here!
  • You can select a different animation style out of the available three by replacing fadeAndPop with fade or none. The animation names are case-sensitive. Make sure you type it as stated above.
  • You can choose to control the snowballs size, speed, count and shape by editing: deviceorientation : true, round : true, minSize: 1, maxSize:8, flakeCount : 250 By setting round to false, you can display square shape snow balls. I would recommend to keep it as it is for natural snowfall effect. flakecount refers to the number of snowballs falling at a time.
  • If you wish to display the popup only once to a visitor and never again in his lifetime then replace sessionStorage  with localStorage. This variable appears twice so replace it twice.

   5.  Next search for  ]]> and just above it paste the following styles:

If you wish to display a popup as shown in DEMO1 then use this CSS code:

 

/* -------------------------------------------------- Christmas Popup DEMO1 -------------------------------------------------- */

    #mbt-counter {         padding: 10px;         font-family: oswald, verdana;         background-color: rgba(0, 0, 0, 0)!important;         color: #FFF!important;         position: absolute;         left: 53%;         top: 68%;         font-size: 17px; }

.reveal-modal h1 {         position: absolute;         left: 45%;         font-size: 3em;         color: #FFEA00;         font-family: oswald;         top: 30%;         text-shadow: 2px 4px 12px #000;

        }         .reveal-modal h2 {         position: absolute;         left: 57%;         top: 20%;         font-family: oswald, arial;         font-size: 1.7em;         text-shadow: 2px 4px 10px #000;         color: #FFF; }          .reveal-modal-bg {         position: fixed;         height: 100%;         width: 100%;         background: rgba(0,0,0,.8);         z-index: 100;         display: none;         top: 0;         left: 0;         }         .reveal-modal {         visibility: hidden;         left: 50%;         top:170px;         margin-left: -300px;         width: 550px;         height: 305px;         background: rgba(51, 51, 51, 0) url(http://1.bp.blogspot.com/-TTroJ-Ea3sA/UrhBhxFgyVI/AAAAAAAAM1Y/Bg4sF3Lzu0g/s1600/christmas.png) no-repeat -17px 0px;         position: absolute;         z-index: 101;         padding: 30px 40px 34px;         -moz-border-radius: 8px;         -webkit-border-radius: 8px;         border-radius: 8px;         color: #FFF;         }             .reveal-modal.small         { width: 200px; margin-left: -140px;}     .reveal-modal.medium         { width: 400px; margin-left: -240px;}     .reveal-modal.large         { width: 600px; margin-left: -340px;}     .reveal-modal.xlarge         { width: 800px; margin-left: -440px;}         .reveal-modal .close-reveal-modal {         font-size: 32px;         line-height: .5;         position: absolute;         top: 25px;         right: 25px;         color: #bebebe;         text-shadow: 0 -1px 1px rbga(0,0,0,.6);         font-weight: bold;         cursor: pointer;         }                 .reveal-modal .close-reveal-modal:hover {             color:#2d2d2f;         }

Or If you wish to display a popup as shown in DEMO1 then use this CSS code:

/* -------------------------------------------------- Christmas Popup DEMO2 -------------------------------------------------- */

    #mbt-counter {         padding: 10px;         font-family: oswald, verdana;         background-color: rgba(0, 0, 0, 0)!important;         color: #FFF!important;         position: absolute;         left: 5%;         top: 49%;         font-size: 17px; }

    .reveal-modal h1 {         position: absolute;         left: 5%;         font-size: 3em;         color: #FFEA00;         font-family: oswald;         top: 15%;         text-shadow: 2px 4px 12px #000;       

        }     .reveal-modal h2 {         position: absolute;         left: 5%;         top: 5%;         font-family: oswald, arial;         font-size: 1.7em;         text-shadow: 2px 4px 10px #000;         color: #FFF; }          .reveal-modal-bg {         position: fixed;         height: 100%;         width: 100%;         background: rgba(0,0,0,.8);         z-index: 100;         display: none;         top: 0;         left: 0;         }         .reveal-modal {         visibility: hidden;         left: 50%;         top:170px;         margin-left: -300px;         width: 550px;         height: 305px;         background: rgba(51, 51, 51, 0) url(http://2.bp.blogspot.com/-LTWEoQSBqOU/UrhBiaYZbuI/AAAAAAAAM1c/yEiqg5cBnek/s1600/christmas1.png) no-repeat -17px 0px;         position: absolute;         z-index: 101;         padding: 30px 40px 34px;         -moz-border-radius: 8px;         -webkit-border-radius: 8px;         border-radius: 8px;         color: #FFF;         }             .reveal-modal.small         { width: 200px; margin-left: -140px;}     .reveal-modal.medium         { width: 400px; margin-left: -240px;}     .reveal-modal.large         { width: 600px; margin-left: -340px;}     .reveal-modal.xlarge         { width: 800px; margin-left: -440px;}         .reveal-modal .close-reveal-modal {         font-size: 32px;         line-height: .5;         position: absolute;         top: 25px;         right: 25px;         color: #bebebe;         text-shadow: 0 -1px 1px rbga(0,0,0,.6);         font-weight: bold;         cursor: pointer;         }                 .reveal-modal .close-reveal-modal:hover {             color:#2d2d2f;         }

 

   6.  Finally paste the following HTML code just below

   

Count Down Begins!

   

Happy holidays!

        ×    

You can replaced the bolded text with any message you like.

   7.  Save your template and you are all done!

Visit your blog to see a beautiful message popping up to wish you Happy Winter holidays! :)

You are most welcomed to share it with your readers by attaching an attribution link back to this page.

Need Help?

I hope this popup proves useful for most of you. Its not just attractive but too light in weight and load time perspective. It's time you may welcome your visitors with some winter greetings! :)

Kindly let me know if I could be of any help. Peace and blessings buddies. :)



This post first appeared on My Blogger Tricks, please read the originial post: here

Share the post

Christmas Pop-up with Countdown Timer and Falling Snow For Websites

×

Subscribe to My Blogger Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×