(CSS-Javascript-Jquery) How to make thumbnails slider for a carousel?

I'm trying to make a carousel with thumbnails navigation. Something like this Carousel
Due to I don't know how much thumbnails there will be, it should be something like a slider, with previous and next buttons.
I tried with an unordered list but only the first li is shown. What is wrong with this code?