There is an onClick Javascript function for each "Show More". This function changes the visibility of the div to visible to which the default is hidden.
However, as simple as it may be, the code got too big. Is there any way to shorten or shrink this?
Example: just a "Show more" button and a div? So with each click on the "Show more" display a div, one underneath the other?
<!DOCTYPE html>
<html>
<head>
<style>
input{
margin-top: 5px;
}
input#abreBt{
margin-left: 100px;
}
input#bt1{
margin-left: 50px;
}
hr{
width: 300px;
float: left;
}
</style>
</head>
<body>
<input type="button" name="abreBt" id="abreBt" value="Mostrar mais" onClick="javascript: abreBts1();" />
<div name="divHidden" id="divHidden" style="visibility: hidden;">
<input type="button" name="bt1" id="bt1" value="+" />
<input type="button" name="bt2" id="bt2" value="-" />
<input type="button" name="bt3" id="bt3" value="Novo" style="width: 100px;" />
<input type="button" name="bt4" id="bt4" value="+" /><br><hr><br>
</div>
<input type="button" name="abreBt" id="abreBt" value="Mostrar mais" onClick="javascript: abreBts2();" />
<div name="divHidden" id="divHidden2" style="visibility: hidden;">
<input type="button" name="bt1" id="bt1" value="+" />
<input type="button" name="bt2" id="bt2" value="-" />
<input type="button" name="bt3" id="bt3" value="Novo" style="width: 100px;" />
<input type="button" name="bt4" id="bt4" value="+" /><br><hr><br>
</div>
<input type="button" name="abreBt" id="abreBt" value="Mostrar mais" onClick="javascript: abreBts3();" />
<div name="divHidden" id="divHidden3" style="visibility: hidden;">
<input type="button" name="bt1" id="bt1" value="+" />
<input type="button" name="bt2" id="bt2" value="-" />
<input type="button" name="bt3" id="bt3" value="Novo" style="width: 100px;" />
<input type="button" name="bt4" id="bt4" value="+" /><br><hr><br>
</div>
</body>
</html>
<script>
function abreBts1(){
document.getElementById('divHidden').style.visibility="visible";
}
function abreBts2(){
document.getElementById('divHidden2').style.visibility="visible";
}
function abreBts3(){
document.getElementById('divHidden3').style.visibility="visible";
}
</script>