It works... but i want to change the default to hidden. Click first time to show the hidden text
<script>
function displayRow(itemID){
if ((document.getElementById(itemID).style.display == 'block')) {
document.getElementById(itemID).style.display = 'display';
} else {
document.getElementById(itemID).style.display = 'display';
}
}
</script>
<button onclick="displayRow('1')">Show/Hidden text</button>
style="display: hidden;"to your element, or a class which has that trait by defaultdocument.getElementById(itemID).style.display = 'display';This doesn't do anything, i.e.display: displayis not valid CSS.document.getElementById(itemID).style.display = 'none';would be better (or use visibility or opacity instead)