animate image left to right on scroll

what i am trying to do is i have around 6 inline images i want slide them left to right on specific position and stop there for each image.And images have to slide at the time the scrool comes over them.
i tried this javascript for it (totally new to JS)

I've made a few assumptions there... You are using $(...) syntax so I guessed you are using JQuery. JQuery has a .animate() function which should do the trick (http://api.jquery.com/animate/). Also I guessed that you may want to make the css-position of the div fixed so it stays on screen when you scroll.

EDIT: I noticed that you don't want you image on the bottom of the screen but animating when screen reaches it. Updated my fiddle to do that: https://jsfiddle.net/hmzw9y65/1/