<script>
function toggle() {
if( document.getElementById("test").style.display=='none' ){
document.getElementById("test").style.display = '';
}else{
document.getElementById("test").style.display = 'none';
}
}
</script>
I have several <input> boxes and i have the above script to hide and unhide them.
<div id="test" style="display:none;"><input></div>
<div id="test" style="display:none;"><input></div>
I have several of these, but only the first div works. What am I doing wrong. I want all divs to hide and unhide at the same time. Thanks
function toggle() {
if( document.getElementById("test").style.display=='none' ){
document.getElementById("test").style.display = '';
}else{
document.getElementById("test").style.display = 'none';
}
}
</script>
I have several <input> boxes and i have the above script to hide and unhide them.
<div id="test" style="display:none;"><input></div>
<div id="test" style="display:none;"><input></div>
I have several of these, but only the first div works. What am I doing wrong. I want all divs to hide and unhide at the same time. Thanks