The code for this tweak is javascript. All you need to do is to add the javascript code to your template but only within the head (<head></head>) tag. You may visit kantahanan lyrics blog for demo.
The Code:
<script type="text/javascript">
// <![CDATA[
var colour="#666666";
var sparkles=40;
var x=ox=400;
var y=oy=300;
var swide=800;
var shigh=600;
var sleft=sdown=0;
var tiny=new Array();
var star=new Array();
var starv=new Array();
var starx=new Array();
var stary=new Array();
var tinyx=new Array();
var tinyy=new Array();
var tinyv=new Array();
window.onload=function() { if (document.getElementById) {
var i, rats, rlef, rdow;
for (var i=0; i<sparkles; i++) {
var rats=createDiv(3, 3);
rats.style.visibility="hidden";
document.body.appendChild(tiny[i]=rats);
starv[i]=0;
tinyv[i]=0;
var rats=createDiv(5, 5);
rats.style.backgroundColor="transparent";
rats.style.visibility="hidden";
var rlef=createDiv(1, 5);
var rdow=createDiv(5, 1);
rats.appendChild(rlef);
rats.appendChild(rdow);
rlef.style.top="2px";
rlef.style.left="0px";
rdow.style.top="0px";
rdow.style.left="2px";
document.body.appendChild(star[i]=rats);
}
set_width();
sparkle();
}}
function sparkle() {
var c;
if (x!=ox || y!=oy) {
ox=x;
oy=y;
for (c=0; c<sparkles; c++) if (!starv[c]) {
star[c].style.left=(starx[c]=x)+"px";
star[c].style.top=(stary[c]=y)+"px";
star[c].style.clip="rect(0px, 5px, 5px, 0px)";
star[c].style.visibility="visible";
starv[c]=50;
break;
}
}
for (c=0; c<sparkles; c++) {
if (starv[c]) update_star(c);
if (tinyv[c]) update_tiny(c);
}
setTimeout("sparkle()", 40);
}
function update_star(i) {
if (--starv[i]==25) star[i].style.clip="rect(1px, 4px, 4px, 1px)";
if (starv[i]) {
stary[i]+=1+Math.random()*3;
if (stary[i]<shigh+sdown) {
star[i].style.top=stary[i]+"px";
starx[i]+=(i%5-2)/5;
star[i].style.left=starx[i]+"px";
}
else {
star[i].style.visibility="hidden";
starv[i]=0;
return;
}
}
else {
tinyv[i]=50;
tiny[i].style.top=(tinyy[i]=stary[i])+"px";
tiny[i].style.left=(tinyx[i]=starx[i])+"px";
tiny[i].style.width="2px";
tiny[i].style.height="2px";
star[i].style.visibility="hidden";
tiny[i].style.visibility="visible"
}
}
function update_tiny(i) {
if (--tinyv[i]==25) {
tiny[i].style.width="1px";
tiny[i].style.height="1px";
}
if (tinyv[i]) {
tinyy[i]+=1+Math.random()*3;
if (tinyy[i]<shigh+sdown) {
tiny[i].style.top=tinyy[i]+"px";
tinyx[i]+=(i%5-2)/5;
tiny[i].style.left=tinyx[i]+"px";
}
else {
tiny[i].style.visibility="hidden";
tinyv[i]=0;
return;
}
}
else tiny[i].style.visibility="hidden";
}
document.onmousemove=mouse;
function mouse(e) {
set_scroll();
y=(e)?e.pageY:event.y+sdown;
x=(e)?e.pageX:event.x+sleft;
}
function set_scroll() {
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
}
window.onresize=set_width;
function set_width() {
if (typeof(self.innerWidth)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
}
function createDiv(height, width) {
var div=document.createElement("div");
div.style.position="absolute";
div.style.height=height+"px";
div.style.width=width+"px";
div.style.overflow="hidden";
div.style.backgroundColor=colour;
return (div);
}
// ]]>
</script>



74 comments:
June 24, 2009 8:27 AM
how do I add a text box like, Subscribe if you like my post, in every blog post like you. Kindly mail me thisisvj@gmail.com
June 26, 2009 10:13 AM
i once tried webfetti.com
Top Five
June 26, 2009 8:24 PM
back visit.
nice articel
June 28, 2009 10:20 PM
just dropping by here
TOP FIVE
BREAKING THE BOUNDARIES
SONG TO REMEMBER
TV MARATHON
POSITIVE THINKER
SUPER BLOG
July 1, 2009 3:30 AM
I think that this effect is a bit gay. LOL
July 1, 2009 6:01 AM
hello chester! this is cool!
btw, kindly update the link URL for the blog JUST ABOUT ANYTHING from http://seasons.pinoyvibes.net/ to my new URL: http://www.kikamzpera.com/. thanks!
July 2, 2009 12:18 AM
nice effect Hapi :)
July 2, 2009 12:57 AM
Nice tip. I may have to try that. Thanks for the visit and the comment.
:-)
July 5, 2009 5:44 AM
Cooool..
July 5, 2009 9:05 PM
Hi, thanks for the visiting. Nice effects. :D
See you!
July 5, 2009 10:19 PM
hi! just updating my blog list!
July 6, 2009 7:13 AM
Very interesting blog :)
July 6, 2009 9:48 AM
thats cute !!
July 6, 2009 2:16 PM
Nice article ! Thanks for the visit and comment !
http://trade-indian-stock-market.blogspot.com/
July 8, 2009 7:50 PM
wow good info. thx 4 ur visit friend
July 9, 2009 2:43 AM
Hello back to you Chester :)
July 10, 2009 10:41 PM
Hi,thank you for the visit.Happy weekend.
July 11, 2009 1:11 AM
Thanks for sharing this.
July 11, 2009 9:11 PM
nice info, thx ur visit
July 12, 2009 10:25 PM
I Want to link Exchange with You If You Would Find it Worth Then please Let me Know My Blog is Title :- Results | Jobs | Tax Notifications URL http://fundigg.blogspot.com/ With A Page Rank of 2. Leave a Comment on My Blog With Your URL & Title of Blog. Thanks & Regards
July 14, 2009 5:45 AM
great blog, I just learned so many things after reading a couple of pages!
The Brown Kid Blog
July 15, 2009 5:06 AM
Hello hello :) Thanks for dropping by my blog and even leaving a message!
ShanChih
July 15, 2009 9:23 PM
Hi,
Nice info. Thanks for visiting my blogs.
Azwan
http://HotSiries.com
http://VideoLah.com
http://lawak-jenaka.blogspot.com
July 16, 2009 12:17 PM
Great Posts on your blog. Keep it up!
July 20, 2009 12:10 AM
is it make heavy loading?
July 21, 2009 8:33 PM
thanks for the visit htt://www.juan3.com. If you have time add me to your blogroll. .. :)
July 22, 2009 5:36 AM
selamat malam semuanya
buka name/urlnya dong
July 24, 2009 8:34 AM
Cool! nice tips
July 28, 2009 4:54 PM
Hello!
Thanks for visiting my blog
July 30, 2009 7:14 PM
Thnax for visiting at http://albumlirik.blogspot.com
:)
July 30, 2009 10:07 PM
wow, i find ur site very useful :) i would like to exchange links with you? do you mind?
www.phaelun.com
August 5, 2009 4:50 PM
this is so cute - i never thought of adding that!
xox
www.froufroufashionista.blogspot.com
August 8, 2009 1:16 AM
hi..there..
thanx so much for sharing.. nice effect..
do visit my blog for some sparkling ya.. ;)
www.fixingabrokenheart-redynne.blogspot.com
August 9, 2009 11:05 PM
Usefull post, Please leave your comment on my new blog at http://popularbook-id.blogspot.com/
August 11, 2009 6:02 AM
Very nice.
August 13, 2009 5:59 AM
thanks Hapi !!!
August 16, 2009 3:28 AM
Nice, nice. :D
August 17, 2009 3:14 AM
thank a lot about the info...
i'll try
August 17, 2009 2:02 PM
Hi!
Thanks for the visit at http://espaciomixto.blogspot.com and, as you said... "happy blogging". :-)
August 17, 2009 2:47 PM
www.pes--edit.blogspot.com
August 18, 2009 6:03 AM
gracias
August 19, 2009 8:52 PM
i've subscribed to your post Now send me that ebook please. send it to my email adress ramkajikayastha@yahoo.com thanx. u have a nice blog
August 21, 2009 1:02 PM
obrigada pela visita.
August 22, 2009 12:11 AM
Thankx for commenting , I have bookmarked your blog.I will surely test your code!!
August 22, 2009 10:10 AM
Thank you for the visit and comment.
please do visit my profile and visit my blogs and suggest me how i could improve them. i am trying a hand in a few different areas all of them in separate blogs.
August 22, 2009 7:17 PM
Good Job!
August 23, 2009 6:08 PM
hapi blogging to you too : D
P.S.
awesome blog!
August 24, 2009 5:39 PM
Hi Hapi
Thanks for visiting my blog. I have also put in a link at my Blogger Templates 123 blog which also shares about templates, tips and tricks about blogging http://blogger-templates123.blogspot.com
August 24, 2009 9:49 PM
wow, nice post..
regards,
HapiBlog
August 25, 2009 5:01 AM
cool blog
thx for visiting!
August 25, 2009 2:27 PM
back viset u have nice blog too iwant help from u plz can u give how i add html for window player
August 25, 2009 5:15 PM
i visited, hello there!
August 27, 2009 6:22 AM
what a useful post :)
anytime? visit my blog
thanks
August 28, 2009 1:35 AM
tks for your visit in www.bebendo.com.br
Good blog, unfortunetly my english is too bad to get te SEO Book, ´cause I would like...
kiss
August 28, 2009 12:08 PM
Hi Thanks for your visit and comments,your blog and always very nice.
regard
August 29, 2009 7:43 AM
wew...awesome !
August 30, 2009 7:52 AM
Thanks so much for dropping by my blog (if you forget which blog was mine, see my link below). I'm so glad you took the time to comment on my blog! It prompted me to head over to your blog to check it out and I saw your post on the sparkles blog effect and LOVE it!!
http://nocostcashfromhome.blogspot.com
It was so easy to copy the code and paste it into my blogs HTML. Not only do I like the effect, but I'm betting that my visitors will hang around a few seconds longer than they normally might have just to check out the effect.
If you'd be OK with it, I'd like to put a link on my blog to this post. Please e-mail me at debbie at twinendeavors dot com and let me know it is OK.
Thanks so much Hapi!!
REMINDER TO ALL BLOGGING / HTML NEWBIES -
ALWAYS save your blogs HTML code BEFORE revising or adding to it. Copy and paste the HTML into a notepad or wordpad to your hard drive(MS Word didn't work from me - probably due to some auto formatting that it does that notepad / wordpad doesn't do). This way if your blog isn't functioning as it should or if it "blows up", you can always revert back to your original HTML code. Trust me, I learned that lesson the hard way!!
August 30, 2009 12:56 PM
thanks for visiting :)
September 5, 2009 8:36 AM
interesting points...
just visiting too :]
see u
September 5, 2009 8:37 AM
interesting points...
just visiting too :]
see u
September 6, 2009 2:22 PM
Hello, thanks for visit my blog.
Your blog is very interesting.
Kiss
September 8, 2009 7:58 PM
Great blog!!!
Thank you for stopping by my place. I hope you will return soon.
Andrea
September 9, 2009 4:54 AM
i try this
September 10, 2009 6:09 AM
Thanks to your visit, Hapi! I hope you can come back!
Nice blog yours, too!
Have a nice day!
=*
September 14, 2009 8:02 AM
Hi, thanks for the visiting.
September 14, 2009 11:56 AM
hELLO
http://novidadesautomotivas.blogspot.com/
September 15, 2009 8:26 PM
hey thanks, good site :-)
September 20, 2009 2:12 AM
I love that effect!! Thanks for the code!
September 20, 2009 3:21 PM
You have an interesting blog!
September 21, 2009 1:16 PM
Ass.Sebelumnya Q ngin ngucapin "Andai jemari tak sempat berjabat.
Jika raga tak bisa bersua.
Bila Ada kata membekas luka.
Semoga pintu maaf masih terbuka.
Selamat Idul Fitri" Q dah Linkback nih.. Linkback y.. Dah bisa di cek ko'. Q tunggu backlinknya. Trims. Ass
September 26, 2009 6:03 PM
Hi,
Your site is one of my favorites seen around blog explosion. Keep up the good work.
I enjoy reading your blog. It is great to find someone who can find the fun things in life!
I wish you all the best in all years. I look forward to developing a friendship and networking with you.
Take a look at my websites AriesTrade Network in Europe.
With Regards,
Karoly Domonyi
http://www.twitter.com/AriesNetwork
September 26, 2009 9:11 PM
nice effect.
thanks for the visit.
September 27, 2009 7:33 PM
how do you do?
I'm just backing your visit.
Back in my place when you want. Brazilian doors are'll always open!
kisses
=***
September 29, 2009 10:26 AM
Thank you for visited my blog.
Have a nice day~!!!
Post a Comment