I want my div to show content, then disappear when I click a checkbox and that it shows a second content in it.
When the checkbox is unchecked then the div shows the previous content back and hides the current one.
Each div have one input box and a submit button.
Thank you
Code Example :
I am using this, want to be modified this to when checkbox clicked div1 disseper and show div2
<script type="text/javascript">
function showMe (it, box) {
var vis = (box.checked) ? "block" : "none";
document.getElementById(it).style.display = vis;
}
</script>
<input type="checkbox" name="multi_note" id="checkboxes-0" value="1" onclick="showMe('div1', this)"> Show Div
<div id="div1" style="display:none">
<label>Example 1</label>
<select id="selectbasic" name="selectbasic" class="form-control">
</div>