There are a couple of small issues with your code, they should become easy to identify if, as Ali suggested, you use the error console (it's totally worth spending some time learning how to use it

).
As Blitz mentioned, the "pic.lenght" was misspelled, so that is an obvious one to fix.
The other issue is that in your code you get a reference to the "pic" element and try to loop over it, however what happens is that "pic" only contains one element because getElementById() will only ever return a single element.
So, to fix your code what you need to do is get a reference to pic (like you already have), but then you'll want a reference to the list elements below that. You can do this by calling getElementsByTagName("li") on the "pic". e.g.
Code JavaScript:
var pic, items;
pic = document.getElementById("pic");
items = pic.getElementsByTagName("li");
console.log(items);// will show you the contents of items in your error console
One other thing I'd like to point out which I think will be important moving forward from here, is that if you loop over a list of DOM elements it is important to cache the length property.
So when you start your loop you would do something like this:
Code JavaScript:
var i, itemsLen;
itemsLen = items.length;
for ( i = 0; i < itemsLen; i+=1) {
//do stuff
}
Bookmarks