young & beautiful
Will you still love me when I got nothing but my aching soul?

Rotating Gifs/Images Tutorial  

Okay, so people have been asking me how to get rotating gifs in their sidebar of their blog. When I did it myself I had to ask around for help as well but no one really made it clear so I had to figure it out myself. I wanted to make a tut to make it really clear for everyone so here I am!

First, you want to have the actual javascript code for the sidebar. You need to have the actual gif or image uploaded to a website (I suggest using tinypic or photobucket) because you are using a link and NOT using a document directly from your computer. So make sure you have it uploaded first.

COPY THIS CODE:

<script language=”JavaScript”>

<!—

function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]=”image link”
myimages[2]=”image link”
myimages[3]=”image link”
myimages[4]=”image link”
myimages[5]=”image link”
myimages[6]=”image link”

var ry=Math.floor(Math.random()*myimages.length)

if (ry==0)
ry=1
document.write(‘<img src=”’+myimages[ry]+’” border=0>’)
}

random_imglink()

//—>

</script> 

You can have as many images as you want and that’s what makes it so awesome! You just have to put the link of your uploaded image/gif where it says “image link”.

Now I think what makes everyone really confused is where to actually put this code. It should go in the same place as your info is in your sidebar. The trick is understanding that the place where it asks to upload your image should be EMPTY. You should not upload any image for your sidebar since you’re just using your own code for it instead.



This is a screencap of my blog when I customize it. As you see I have the code in the description area. (I also added a center tag but don’t worry about that.)



As you can see I have a background uploaded because that doesn’t affect my sidebar but there is no sidebar uploaded. If I did so it would just put an extra image in the sidebar and usually it looks messy. If you uploaded another image there just press the Clear button.

Also, take into account the image dimensions of the sidebar and that can be different for each theme. If you know html well you can go into the code itself and change the dimensions to your liking but I would suggest just going with the theme and using those dimensions. 

If you have any questions I would love to help and you can always message me!

I hope this helps clear it up! Enjoy.  




  1. delanarey reblogged this from delanarey
  2. casandthewinchesters reblogged this from atticrissfinch
  3. sunshineblaine reblogged this from atticrissfinch
  4. delanarey posted this