At the top of my view /Home/Clear.cshtml, I have
<button type="button" id="show" class="find-proj">Find Project</button>
At the bottom of my /Shared/_Layout.cshtml view, I have a table that is wrapped in
<div class="wrapper">...</div>
My CSS has
.wrapper { display: none; }
And in the head of my /Shared/_Layout.cshtml view I have the following script:
<script>
$(document).ready(function(){
$("#show").click(function(){
$(".wrapper").show();
});
});
</script>
The goal is that when I press the button, the table appears at the bottom of the page. The table is currently invisible, but when I press the button, nothing happens.
EDIT: The mistake was that for some reason jQuery was being loaded at the bottom of the page for some strange reason. I changed $(".wrapper").show();
to $(".wrapper").css('display','block');
and moved jQuery to load before it, and it works like a charm. Thanks everyone!