<html>
<head>
<style>
div{
display: none;
}
</style>
</head>
<body>
<div>тест1</div><input type="checkbox"><br>
<div>тест2</div><input type="checkbox"><br>
<div>тест3</div><input type="checkbox"><br>
<div>тест4</div><input type="checkbox"><br>
<div>тест5</div><input type="checkbox"><br>
<div>тест6</div><input type="checkbox"><br>
<script>
[].forEach.call(document.querySelectorAll('input[type="checkbox"]'), function(el){
el.onchange=function(){
el.previousElementSibling.style.display = el.previousElementSibling.style.display === 'block'?'none':'block';
};
});
</script>
</body>
</html>