I am currently working on a CRUD project and incorporating some Javascript/JQuery into it. I have a button labeled "Add", which, when clicked, displays a specific div element. However, I'm facing an issue where the div is already visible before the user clicks the add button.
Question: How can I ensure that the div remains hidden until the add button is clicked?
My Approach
<button class="btn btn-success" id="add-user">Add</button>
<div id="myDiv">
<form id="my-form">
...
</form>
</div>
My JS
$('#add-user').click(function(){
$('#myDiv').toggle();
});