New Year Countdown Gadget For Blogger

countdown new year widget







Just now the Christmas is finished. And the New Year 2012 is on the way. So for this New Year we are offering a special countdown widget for blogger with no ads on it. It's totally ads free and very easy to install and customize in the blog. The JavaScript for this widget was provided by dynamic drive and it was styled and enhanced by MBT for the Christmas but now i have converted this widget for New Year. This widget can be used in other occasion and festival also.

New Year Count Down Gadget For Blogger

  • Go to Blogger > Design >Add a Gadget
  • Choose HTML/JavaScript option
  • Paste the below code inside it,
<style style="text/css"> .lcdstyle{ /*Example CSS to create LCD countdown look*/
background-color:fff;
color:#FF3333;
font: bold 20px arial;
padding: 15px;border:5px solid #0080ff; border-radius:15px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
box-shadow: 5px 5px 5px #CCCCCC;
} .lcdstyle sup{ /*Example CSS to create LCD countdown look*/
font-size: 120%
} </style> <script type="text/javascript"> /***********************************************
* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more. ***********************************************/ function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
} cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
} cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
} cdtime.prototype.showresults=function(){
var thisobj=this
var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield) setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
} /////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW////////////////////////////// //Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left //The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc
function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds left until December 31, 2011 18:25:00"
}
else{ //else if target date/time met
var displaystring=""
}
return displaystring
} function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span> "
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Happy New Year 2012") //Instead, perform a custom alert
}
return displaystring
} </script>
<h1 style="color:#0080ff; margin:0;">Happy New Year 2012</h1>
<div id="countdowncontainer"></div>
<br />
<div id="countdowncontainer2"></div> <script type="text/javascript"> var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00") futuredate.displaycountdown("days", formatresults) var currentyear=new Date().getFullYear()
//dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1
var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>31)? currentyear+1 : currentyear
var christmas=new cdtime("countdowncontainer2", "December 31, "+thischristmasyear+" 0:0:00")
christmas.displaycountdown("days", formatresults2) </script>
  • Save your widget and you are done. Visit the blog to see if it is working or not.
Make these changes if you wish to:
  •  To change the color of Happy New Year 2012 edit color:#0080ff
  •  To change the rounded blue border colour and size edit border:5px solid #0080ff
  •  To change the Count Down text colour edit color:#FF3333
Click here to Subscribe to FREE email updates from GulmiResunga,so that you do not miss out anything that can be valuable to you.

COMMENTS

BLOGGER: 1
Loading...
Name

Aastha Band,1,Alcatel,1,Android,17,Android One,1,Anju Pant,26,Apple,18,ARK,3,Badri Pangeni,1,Basanta Thapa,2,Bhojraj Kafle,2,Bima Kumari Dura,6,Bimal Raj Chhetri,2,Bindu Pariyar,5,Birahi Karki,1,Bishnu Khatri,2,Bishnu Majhi,8,Blogger,130,Blogger Templates,16,Blogger Widgets,57,Blogging Tips and Tricks,74,BQ,1,Car Price in Nepal,2,Celkon,4,CG TV,1,Colors,9,Computer Tips,58,Dashain,1,Dashain Tihar Songs,43,Datsun,1,Deepak Limbu,8,Dell,2,Deuda,1,Devi Gharti,30,English Jokes,24,Entertainment,948,Facebook,39,FIFA World Cup,2,Fonts,5,Free Giveaway,6,Free Icons,3,Free SMS,5,Gionee,3,Google,16,Google Plus,5,Guest Post,32,Gurung Movie,2,Hemant Sharma,4,Hemanta Shisir,18,Hero,1,Hindi Jokes,5,Hollywood,1,How To,41,Huawei,15,Hum Gaire,2,Increase Blog Traffic,14,Indira Joshi,4,Info Dose,425,Internet Tips,92,Intex,1,Jokes Collection,97,Juna Shrish,6,Jyoti Magar,1,Kalpana Devkota (Poudel),6,Kamal Shrestha,1,Karbonn,1,Kauda Song,2,Keshu Gurung,1,Khuman Adhikari,9,Komal Oli,1,Korean Songs,1,Krishna Gurung,2,Kulendra BK,3,Laptop Price,2,Lava,5,LG,6,LG TV,2,Load Shedding Schedule,19,Lok Dohori Songs,268,Magar Bhasa,2,Mandavi Tripathi,6,Manju Poudel,2,Manoj Raj,7,Melina Rai,1,Micromax,12,Microsoft,2,Mobile Phone Price in Nepal,102,Movie Promo,80,Muna Thapa Magar,7,Narendra Pyasi,17,Ncell,18,Nepali Cricket,7,Nepali Full Movie,110,Nepali Jokes,72,Nepali Model,1,Nepali Movie Songs,199,NTC,22,Obi Worldphone,2,Online Banking,4,Online Earning,7,Page Navigation,4,Panasonic,3,Panasonic TV,1,Pashupati Sharma,5,Philips TV,1,Photo Gallery,7,Pinterest,2,Pokemon Go,1,Pop and Adhunik Songs,206,Poster Release,103,Prakash Katuwal,4,Pramod Kharel,11,Purnakala BC,29,Puskal Sharma,1,Radhika Hamal,6,Rajan Gurung,1,Rajesh Payal Rai,6,Rajina Rimal,11,Raju Gurung,2,Raju Pariyar,5,Ram Krishna Dhakal,4,Ramji Khand,15,Rishi Khadka,1,Roila Song,4,Roshan Gaire,1,Sabina Gurung,1,Salaijo,4,Samsung,22,Samsung TV,4,Sarada Tamang,1,Sardarji Jokes,5,SEO Tips,6,Sharmila Gurung,2,Shiva Pariyar,20,Shreedevi Devkota,2,Sindhu Malla,1,Smart Phones,23,Smriti Pun,1,SMS,1,Software Download,14,Sony,3,Sony TV,1,Sudip Adhikari,1,Swaroop Raj Acharya,10,Tata,1,Technology,264,Teej Song,49,Tejas Regmi,2,Tika Pun,16,Top List,2,Trishna Gurung,8,TU Notice,10,TV Price in Nepal,10,Twitter,8,Two Wheeler Price,2,Udit Narayan Jha,4,Useful Tools,10,Useful Websites,73,Videcon,1,Wallpapers,4,Windows 8,2,WordPress,2,Xiaomi,6,Yam Chhetri,4,Yamaha,1,YouTube,13,ZTE,1,
ltr
item
GulmiResunga.com: New Year Countdown Gadget For Blogger
New Year Countdown Gadget For Blogger
New Year Countdown Gadget For Blogger
http://2.bp.blogspot.com/-x0xjoNx7U_o/TvgRKt_rxNI/AAAAAAAAAY8/dYfWj0KEWFM/s1600/new_year_countdown_widget.JPG
http://2.bp.blogspot.com/-x0xjoNx7U_o/TvgRKt_rxNI/AAAAAAAAAY8/dYfWj0KEWFM/s72-c/new_year_countdown_widget.JPG
GulmiResunga.com
http://www.gulmiresunga.com/2011/12/new-year-countdown-gadget-for-blogger.html
http://www.gulmiresunga.com/
http://www.gulmiresunga.com/
http://www.gulmiresunga.com/2011/12/new-year-countdown-gadget-for-blogger.html
true
9098666623388878892
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy