I am looking to create a sliding Div over another div in a simple way. The example provided in this Fiddle is exactly what I have in mind, but as someone new to coding, I encountered the warning
Uncaught ReferenceError: $ is not defined
after transferring the code to my own files.
<div class="hidden" id="slide">INFORMATION ABOUT IMAGE APPEARS ON CLICK</div>
<div class="image"><br>THERE'S A NICE IMAGE HERE</div>
$(document).ready(function() {$('#slide').click(function() {
var hidden = $('.hidden');
if (hidden.hasClass('visible')) {
hidden.animate({"top": "160px"}, "slow").removeClass('visible');
}
else {
hidden.animate({"top": "0px"}, "slow").addClass('visible');
}
});
});
It's clear to me now that I need to link one or more files in the HTML head to define my $
. Can anyone assist me in identifying the correct files and guiding me on how to incorporate them into my html?