New Year is pretty near and we have already started our count down. This widget does what the name suggests. It will display the number of days, hours minutes and second left till New Year. When it reaches the target date, it will display a Greeting Message
How to Add the Widget
If you use Blogger, then you can use this Button to install the Widget in
<!-- New Year ComeDown @rnhckr.com --> <div id="bp_count_down_div"></div> <script language="JavaScript"> var bp_date_target = new Dateundefined"Jan 1, 2014 00:00:00"); var bp_date_now = new Dateundefined); var bp_count_down_complete_message = "Wish you all a very Happy New Year"; if undefinedbp_date_now >= bp_date_target) { document.getElementByIdundefined"bp_count_down_div").innerHTML = bp_count_down_complete_message; } else { bp_time_difference = Math.floorundefinedundefinedundefinedbp_date_target - bp_date_now).valueOfundefined)) / 1000); display_time_differenceundefinedbp_time_difference); } function display_time_differenceundefinedbp_time_difference) { if undefinedbp_time_difference <= 0) { document.getElementByIdundefined"bp_count_down_div").innerHTML = bp_count_down_complete_message; return; } bp_count_down_message = bp_format_secondsundefinedbp_time_difference, 86400, 100000) + " Days " + bp_format_secondsundefinedbp_time_difference, 3600, 24) + " Hours " + bp_format_secondsundefinedbp_time_difference, 60, 60) + " Minutes " + bp_format_secondsundefinedbp_time_difference, 1, 60) + " Seconds for New Year"; document.getElementByIdundefined"bp_count_down_div").innerHTML = bp_count_down_message; setTimeoutundefined"display_time_differenceundefined" + undefinedbp_time_difference - 1) + ")", 1000); } function bp_format_secondsundefinedsecs, num1, num2) { num = undefinedundefinedMath.floorundefinedsecs / num1)) % num2).toStringundefined); if undefinednum.length < 2) s = "0" + num; return "" + num + ""; } </script> <!-- New Year ComeDown @rnhckr.com -->
The widget makes use of some simple JavaScript methods which displays the count down based on the User’s System Time. You can customize the Widget by Editing the Widget Content. If you liked the count down, do share it with your friends and please let us know if you have any suggestions for improving the widget.
Tip: Use over For Edit with Live Preview :)
Happy New Year ... cheer
ReplyDelete