<div class="first-ul">
<ul>
<li><span>1</span></li>
<li><span>2</span></li>
</ul>
</div>
<div class="second-ul">
<ul>
<li><span class="data-container"></span><span>text</span></li>
<li><span class="data-container"></span><span>text</span></li>
</ul>
</div>
<script type="text/javascript">
var data=$(".first-ul ul li span");
for (i=0;i<data.length;i++){
$(".second-ul .data-container").eq(i).text(data.eq(i).text())
}
</script>
<div class="button">Button</div>
<div class="class-main">
<div class="class">1</div>
<div class="class">2</div>
<div class="class">3</div>
</div>
<script type="text/javascript">
document.getElementsByClassName("button")[0].onclick=function(){
console.log(document.getElementsByClassName("class")[1])
}
</script>