Salsa's Tutobies Blog // Vacuum
HOME ABOUT RANDOMS TUTORIAL FREEBIES FRIENDS RULES SKINS OLSHOP












Saturday, 19 July 2014 - 4 People[s]

       Hmm sebenernya aku gatau mau namain tutorial ini apa, mungkin kalian sendiri juga bingung maksud tutorial ini apa. Jadi, smooth viewing body ini seperti blog aku yang mana kalau dibuka akan keluar secara lembut (?) Menurut aku kalau kita pasang smooth viewing body ini, kesannya blog kita itu jadi adem haha. 

   Designer template : paste di HTML/JavaScript
   Classic template : paste di bawah kode </style>

And this is the code :
<script language="javascript" type="text/javascript">
/* toggle() checks to see if the images has already been faded
or not and sends the appropriate variables to opacity(); */
function toggle(el,milli) {
// Get the opacity style parameter from the image
var currOpacity = document.getElementById(el).style.opacity;
if(currOpacity != 0) { // if not faded
fade(el, milli, 100, 0);
} else { // else the images is already faded
fade(el, milli, 0, 100);
}
}
/* changeOpacity() uses three different opacity settings to
achieve a cross-browser opacity changing function. This
function can also be used to directly change the opacity
of an element. */
function changeOpacity(el,opacity) {
var image = document.getElementById(el);
// For Mozilla
image.style.MozOpacity = (opacity / 100);
// For IE
image.style.filter = "alpha(opacity=" + opacity + ")";
// For others
image.style.opacity = (opacity / 100);
}
/* fade() will fade the image in or out based on the starting
and ending opacity settings. The speed of the fade is
determined by the variable milli (total time of the fade
in milliseconds)*/
function fade(el,milli,start,end) {
var fadeTime = Math.round(milli/100);
var i = 0; // Fade Timer
// Fade in
if(start < end) {
for(j = start; j <= end; j++) {
// define the expression to be called in setTimeout()
var expr = "changeOpacity('" + el + "'," + j + ")";
var timeout = i * fadeTime;
// setTimeout will call 'expr' after 'timeout' milliseconds
setTimeout(expr,timeout);
i++;
}
}
// Fade out
else if(start > end) {
for(j = start; j >= end; j--) {
var expr = "changeOpacity('" + el + "'," + j + ")";
var timeout = i * fadeTime;
setTimeout(expr,timeout);
i++;
}
}
}
</script>






Blogger Trisha Tan said...

Kak Salsa, memagnya kalau kita pasang ini ada apanya?

 
Blogger Zahra Tiffany said...

Re-Post ya ka ;) pake credit ko

 
Blogger Alneira Firja Azaria said...

Izin repost ya Kak Salsa

 
Blogger Miyuku said...

re-post ya kak credits aman kok

 

Post a Comment

for your info
about

[Ordinary girl with extraorninary idea]
Hello ! My name is Anugerah Mullia Ulfa Salsabella. You can call me Salsa. Born at 2000 line. Live in Bekasi, West Java. Proud to be part of swiftie and directioner.

Do follow me
Besties

hide and seek
Secret box

1 2 3 4
This is Navigate around. Please read this :
1 = Ask.fm box
2 = My sites
3 = Blog stats
4= Search box

shout what ever
tagboard

I'm sorry, but the chatbox is not available now because I'm in HIATUS mode. You can contact me on facebook or twitter^-^

related post
archives

Big claps for them
credits

© 2013 - Full Template by Salsa. Somebody help me is Gh R A Y. I took many part of this blog by many skins, so big thanks to blogskins.com, espesially to Uhbmy and there's no basecode. Best viewed is in Google Chrome (Recommended). Don't ever dare to open my page source and copy any content from this site!