I have created a javascript
script to reveal hidden content, but for some reason it is not working when I click on it. Can anyone provide assistance?
Below is the script I am using:
<script src="style/jquery/jquery.js"></script>
<script>
$(document).ready(
function(){
$("#yes").click(
function(){
$("div#did").show();
}
)
}
function(){
$("#no").click(
function(){
$("div#did_not").show();
}
)
}
)
</script>
This is my CSS file used to hide the content:
#did{
display: none;
}
#did_not{
display: none;
}
My HTML code is as follows:
<button id="yes">Yes</button>
<button id="no">No</button>
<div id="did">
<p>
Yes
<p/>
</div>
<div id="did_not">
<p>
No
</p>
</div>
Any guidance or support would be greatly appreciated!