Firstly, sorry for posting, I'm pretty new to coding, I will try to keep it short and sweet.
Simply put, when I include jQuery inline, IE code under my HTML, it works fine - the element I'm trying to animate is βhidingβ and then βshowingβ how it should.
However, when I create my own separate jquery.js file and put the code there, it cannot display.
I have a cdn script from google and included this along with script and src, where my file is inside my project folder, but still no luck.
In my project folder, I have the folder 'script.js' and then inside this file 'jquery.js'.
Here is the code:
<head> <link rel="stylesheet" type="text/css" href="css/style.css"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> <script src="script.js/jquery.js"></script> </head> <div class="content"> <h2> Hi there</h2> <h3> Take a look...</h3> </div>
Here's jQuery:
<script> $(document).ready(function() { $(".content").hide(1000).show(1000); }); </script>
("Checking" the problem in chrome, I get the error message "jquery.js: 1 Uncaught SyntaxError: Unexpected token <) - But I do not see where I am using '<' incorrectly.
Thanks in advance, and please feel free to tell me if I missed something important.
source share