JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<div id="content">
<div id="up-left">
<div id="box" style="background: red" class="snap white">
<h1>ONE</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="snap black">
<h1>TWO</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="snap white">
<h1>THREE</h1> <a class="more" href="" title=""></a>
</div>
<div id="box" class="snap black">
<h1>FOUR</h1> <a class="more" href="" title=""></a>
</div>
<div id="box" class="snap white">
<h1>FIVE</h1> <a class="more" href="" title=""></a>
</div>
<div id="box" class="snap black">
<h1>SIX</h1> <a class="more" href="" title=""></a>
</div>
</div>
<div id="down-right">
<div id="box" style="background: green" class="black">
<h1>ONE</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="white">
<h1>TWO</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="black">
<h1>THREE</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="white">
<h1>FOUR</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="black">
<h1>FIVE</h1>
<a class="more" href="" title=""></a>
</div>
<div id="box" class="white">
<h1>SIX</h1>
<a class="more" href="" title=""></a>
</div>
</div>
</div>
<script>
function crisscross() {
$('up-left').style.bottom = '-' + window.scrollY + 'px';
$('down-right').style.bottom = '-' + window.scrollY + 'px';
}
window.onscroll = crisscross;
</script>
CSS
div#content {
width: 100%;
height: 100%;
position: absolute;
top:0;
right:0;
bottom:0;
left:0;
}
h1 {
margin: 0;
padding: 0;
color:#fff
}
#box {
position: relative;
width: 100%;
height: 500px;
display: block;
margin: 0;
padding: 0;
}
.black {
background: black;
}
.white {
background: grey;
}
div#up-left {
position:absolute;
z-index:4px;
left: 0;
top: 0;
width: 50%;
margin: 0;
padding: 0;
}
div#down-right {
position:fixed;
bottom: 0px;
z-index: 5px;
left: 50%;
width: 50%;
margin: 0;
padding: 0;
}
JavaScript
jQuery.noConflict();
var ele = document.getElementById("box");
var arr = jQuery.makeArray(ele);
var data = (ele)[0];
$(window).scroll(function() {
if ( $(window).scrollTop() >= 1000) {
$(data).clone().appendTo('body');
} else {
}
});