Click the button when the display property changes.
example, button class = "1" click results - the first-img class display: block, The second-img class display: none, the third-img class display: none.
button class = "2" click results - the first-img class display: none, The second-img class display: block, the third-img class display: none.
button class = "3" click results - the first-img class display: none, The second-img class display: none, the third-img class display: block.
codepen = http://codepen.io/soso77/pen/bwkYZX
ol,
ul,
li {
list-style: none;
}
.slider {
float: left;
position: relative;
width: 980px;
}
img.first-img,
img.second-img,
img.third-img {
max-height: 625px;
display: block;
}
img.second-img,
img.third-img {
display: none;
}
<ul>
<li>
<img src="http://placehold.it/980x625/?text=image-1st" class="first-img" />
<img src="http://placehold.it/980x625/?text=image-2nd" class="second-img" />
<img src="http://placehold.it/980x625/?text=image-3er" class="third-img" />
</li>
<li>
<img src="http://placehold.it/980x625/?text=image-1st" class="first-img" />
<img src="http://placehold.it/980x625/?text=image-2nd" class="second-img" />
<img src="http://placehold.it/980x625/?text=image-3er" class="third-img" />
</li>
<li>
<img src="http://placehold.it/980x625/?text=image-1st" class="first-img" />
<img src="http://placehold.it/980x625/?text=image-2nd" class="second-img" />
<img src="http://placehold.it/980x625/?text=image-3er" class="third-img" />
</li>
<li>
<img src="http://placehold.it/980x625/?text=image-1st" class="first-img" />
<img src="http://placehold.it/980x625/?text=image-2nd" class="second-img" />
<img src="http://placehold.it/980x625/?text=image-3er" class="third-img" />
</li>
</ul>