XBM_Er XBM_Er - 12 days ago 7
CSS Question

My website doesn't load jQuery

Here is my code, I can't seem to load any jQuery commands. Any help would be appreciated. Thanks

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<meta charset="utf-8">
<title>Blank</title>
<center>
>
<h1>Blank<h1>
</center>

<!-- put jquery at end! -->
<script type="text/javascript" src="js/script.js"></script>
<script type="js/jquery-2.1.4.min.js">
</body>
</html>

Answer

You made two mistakes:

  • You put the link to the jQuery library inside the type attribute, instead of the src
  • You are trying to load the scripts that make use of jQuery before jQuery itself

Try this

<script type="text/javascript" src="js/app/jQuery.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>