So I'm making a website with jquery, however, the hide function doesn't work. My code is below:
$(document).ready(function () {
$("#myDiv").hide
})
Does anyone know how to fix this?
$(document).ready(function () {
$("#mydiv").hide()
})
$(".show").click(function(){
$("#mydiv").show();
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="mydiv">This is a div.</div>
<button class="show">Show</button>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments