JSFiddle - React, Tailwind, and code Playground
HTML
<br/><br/>
<div class="item">
<div id="top">
<img src="http://img814.imageshack.us/img814/8089/car1j.jpg" />
</div>
<div id="bottom">
<img src="http://img178.imageshack.us/img178/3779/car2dy.jpg" />
</div>
<div class="optionsExpandButton"></div>
</div>
CSS
img, div { border:0; padding:0; margin:0; }
.item {
position: absolute; }
#top {
z-index:1;
position: relative;
top:0px; left:0px;
width:500px; height:375px; }
#bottom {
z-index:-1;
position:relative;
top: -375px; left:0px;
width:550px; height:375px; }
div.optionsExpandButton {
position:relative;
width:50px; height:375px;
top: -750px; left: 500px;
background-color: #000;
z-index:999;
}
JavaScript
$(function() {
$(".optionsExpandButton").toggle(function() {
$(this).animate({left: '+=425' });
$("#bottom").animate({left: '+=425' });
}, function() {
$(this).animate({left: '-=425' });
$("#bottom").animate({left: '-=425' });
});
});