Change a div content in position

Viewed 97

I want to change a text depending on a div position. A picture is worth a thousand words, so here's a gif of what I want :

example of what I wan't

And here's my code :

https://jsfiddle.net/c0mk2wto/4/

<div class="image i_one"></div>
<div class="image i_two"></div>
<div class="image i_three"></div>

<div class="text t_one">One</div>
<div class="text t_two">Two</div>
<div class="text t_three">Three</div>

Thanks a lot!

2 Answers
Related