Blogger Widgets
CLICK HERE FOR FREE BLOGGER TEMPLATES, LINK BUTTONS AND MORE! »
skip to main | skip to sidebar
ကၽြန္ေတာ့္ Blog ကို အထူးကူညီေပးတဲ့ဆရာက ကိုျပည့္ၿဖိဳး (MMitd) ပါခင္ဗ်ာ။ ကၽြန္ေတာ့္ site ကိုအလည္လာၾကသူမ်ားတခုခုေတာ့ရသြားေစခ်င္ပါတယ္။ လိုအပ္တာမ်ားကိုလည္း COMMENTS မွာေရးေပးၾကပါခင္ဗ်ာ။

Thursday 16 May 2013

Blog မွာ Christmas Countdown Widget ထည့္ခ်င္ရင္

If you use Blogger, then you can use this Button to install the Widget in one Click.

If you want the code to use it elsewhere, then here it is :
<div id="bp_count_down_div"></div>
<script language="JavaScript">
var bp_date_target = new Date("December 25, 2011 00:00:00");
var bp_date_now = new Date();
var bp_count_down_complete_message = "Wish you all a very Happy Christmas";
if (bp_date_now >= bp_date_target) {
 document.getElementById("bp_count_down_div").innerHTML = bp_count_down_complete_message;
} else {
 bp_time_difference = Math.floor(((bp_date_target - bp_date_now).valueOf()) / 1000);
 display_time_difference(bp_time_difference);
}
function display_time_difference(bp_time_difference) {
 if (bp_time_difference <= 0) {
 document.getElementById("bp_count_down_div").innerHTML = bp_count_down_complete_message;
 return;
 }
 bp_count_down_message = bp_format_seconds(bp_time_difference, 86400, 100000) + " Days " + bp_format_seconds(bp_time_difference, 3600, 24) + " Hours " + bp_format_seconds(bp_time_difference, 60, 60) + " Minutes " + bp_format_seconds(bp_time_difference, 1, 60) + " Seconds for Christmas";
 document.getElementById("bp_count_down_div").innerHTML = bp_count_down_message;
 setTimeout("display_time_difference(" + (bp_time_difference - 1) + ")", 1000);
}
function bp_format_seconds(secs, num1, num2) {
 num = ((Math.floor(secs / num1)) % num2).toString();
 if (num.length < 2) s = "0" + num;
 return "" + num + "";
}
</script>
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.

ကိုထြန္းလင္း(တာပြန္)မွေႏြးေထြးစြာႀကိဳဆိုပါတယ္ခင္ဗ်ာ Facebook ရဲ႕ Like button ကိုႏွိပ္ျခင္းျဖင္႕ မိမိရဲ႕ Facebook ေပၚမွာ ဒီ Post ေလးေရာက္သြားမွာပါ။ ဒီ Post ေလးကိုသေဘာက်တယ္ဆိုရင္လည္း Like Button ေလးကိုႏွိပ္ခဲ႕ေပးပါေနာ္။
Stumble
Delicious
Technorati
Twitter
Digg
Facebook
Reddit
Feed

No comments:

Post a Comment