XBM_Er XBM_Er - 10 months ago 62
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>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8">

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

Answer Source

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>