Ciao, potresti fare una cosa di questo tipo ma anche meglio
codice:
<html>
<head>
<script type="text/javascript">
function controllo(obj,toshow){
var uncheck = document.getElementsByClassName('selection');
for(i=0;i<uncheck.length;i++){
uncheck[i].checked = false;
}
obj.checked='cheched';
var hideList = document.getElementsByClassName('row');
for(i=0;i<hideList.length;i++){
hideList[i].style.display = 'none';
}
var showList = document.getElementsByClassName(toshow);
for(i=0;i<showList.length;i++){
showList[i].style.display = 'block';
}
}
</script>
</head>
<body>
tipo 1
<input type="checkbox" class="selection" value="tipo1" name="tipo1" onChange="controllo(this,'tipo1');" />
tipo 2
<input type="checkbox" class="selection" value="tipo2" name="tipo2" onChange="controllo(this,'tipo2');" />
<div class="row tipo1" style="">contenuto tipo1 1</div>
<div class="row tipo2" style="">contenuto tipo2 2</div>
<div class="row tipo1" style="">contenuto tipo1 3</div>
<div class="row tipo2" style="">contenuto tipo2 4</div>
</body>
</html>
Con Jquery sarebbe molto più comodo