HeroftheKnight HeroftheKnight - 3 years ago 143
HTML Question

Linking jQuery to an html document

I'm trying to learn how to make websites and I've gone through to tutorials on http://www.codecademy.com/learn for html/css and jQuery but I can not figure out how to link the jQuery document for so I can use jQuery. A quick google search told me to download jQuery but not only do I not completely know what that does, I don't know how to use it.

Here's what I have from the information I've gathered as far as linking the two documents..

<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="New.css"/>
<script type="text/javascript" src="jquery-1.11.2.min.js">
</script>
<script> type="text/javascript" src="New.js"></script>
</head>


The file I want the Jquery in being New.js and it contains:

$(document).ready(function() {
$("input").fadeOut(1000);
});

Answer Source

You just have a small typo - last <script> in <head> should be:

<script type="text/javascript" src="New.js"></script>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download