I've been trying to add JavaScript to my HTML/CSS, but been running around in circles.
My current set-up is where the HTML, CSS, and JavaScript files (2 files; my JavaScript code, and jQuery's code) are all separate, but linked to each other via the HTML page.
So here are my questions:
Do I put the link to the jQuery code within the HTML head? Or within my JavaScript code page?
Where does this code go? The HTML page, or my JavaScript page?
$(document).ready(function(){
//Code here
});
Above, by 'code here', they mean JavaScript code, right? Not my html code?
I've read about initializing JavaScript code at the bottom of an HTML page. From what I take though, I don't have to do that with jQuery's .ready
function, right?
<head>
or above the closing </body>
tag.