Author | Message |
---|---|
kzhou9
Posts: 5
|
Posted 15:23 Oct 13, 2016 |
It is weird but when I implement two script source, which is Jquery and the local js file, the html file will only take the last one and ignore the first one. eg: <script src="https://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"></script> <--this one does not work at all <script type="text/javascript" src = "description.js"></script> <--this one will be called. Anyone can help me with this?
|
fumjum
Posts: 27
|
Posted 15:29 Oct 13, 2016 |
Try putting the JavaScript from the second file in the html code like the lecture showed. |
venny
Posts: 61
|
Posted 15:30 Oct 13, 2016 |
Try using this one for the jquery |
kzhou9
Posts: 5
|
Posted 15:36 Oct 13, 2016 |
Thx, I tried but nope, only 1 script will work correctly. |
fumjum
Posts: 27
|
Posted 16:20 Oct 13, 2016 |
I mean write it within the <html> tag not in the <head>. Just use a <script> within the <html> tag and put the code you wrote in your js file in between <script> and </script> instead of having a separate js file just like it showed in the lecture notes this week. |
kzhou9
Posts: 5
|
Posted 19:10 Oct 13, 2016 |
Exactly, I tried to place the script everywhere and it just not working..... |
venny
Posts: 61
|
Posted 00:26 Oct 14, 2016 |
Is it possible your src is wrong? Maybe it's looking in the wrong folder? |