Jump to content

script.js Linking Issue

zacfaulkner

So I am trying to link my script.js file to do something with jQuery things, and every single solution I have looked up has failed to work.

I have it right before </body> in index.html, the file is stored in a subfolder named js. The exact code I use to link is:

<script src="js/scripts.js"></script>

and the code inside the script.js file is:

$(document).ready(function() {   $('navbarNS').mouseenter(function() {       $(this).animate({           height: '+=10px'       });   });

Not even a simple 

prompt(Check); 

works. 

 

Console says: "Failed to load resource - file:///C:/Users/..../hubsite1/js/script.js"

 

Would appreciate any help, thanks.

CPU: Intel Core i7 3770K,   CPU Cooler: Corsair H100i,   Motherboard: MSI Z77A-GD55,   LED Lighting: NZXT Hue RGB LED,   GPU: Gigabyte Windforce GTX780 3GB,


Storage: Samsung EVO 250GB (OS), 2TB Seagate, 3TB Seagate,   Case: Corsair 750D,   Monitors: ASUS PB287Q 4K and 42" LG IPS TV,   PSU: Corsair HX650 V2,


Keyboard: Corsair K95 RGB (MX Brown),   Mouse: Logitech M950T,   Headphones: Audio Technica ATH PRO700MK2,   Speakers: Logitech Z906,   Phone: Google Nexus 5,   Tablet: Google Nexus 9

Link to comment
Share on other sites

Link to post
Share on other sites

<script src="js/scripts.js"></script>

VS

js/script.js

 

Find the mistake :D

MB: MSI Z77A-GD55 | CPU: Intel i5-2500k @ 4.5 GHz | RAM: 8GB Kingston DDR3 @1333MHz | GPU: Asus GTX 770 DirectCU II 

Monitor: 22" Samsung SyncMaster B2230H @60Hz | Audio: Creative Aurvana Live! | PSU: SuperFlower 80+ Gold 550 Watt 

OS: ArchLinux + KDE / Windows 8 Pro 64bit | Smartphone: Nexus 4 16GB - CM11

 

Link to comment
Share on other sites

Link to post
Share on other sites

It could be a typo but your missing the s in scriptS if its not a typo.

Link to comment
Share on other sites

Link to post
Share on other sites

<script src="js/scripts.js"></script>

VS

js/script.js

 

Find the mistake :D

 

 

It could be a typo but your missing the s in scriptS if its not a typo.

Wow I feel dumb haha...

Thanks a bunch! :D

CPU: Intel Core i7 3770K,   CPU Cooler: Corsair H100i,   Motherboard: MSI Z77A-GD55,   LED Lighting: NZXT Hue RGB LED,   GPU: Gigabyte Windforce GTX780 3GB,


Storage: Samsung EVO 250GB (OS), 2TB Seagate, 3TB Seagate,   Case: Corsair 750D,   Monitors: ASUS PB287Q 4K and 42" LG IPS TV,   PSU: Corsair HX650 V2,


Keyboard: Corsair K95 RGB (MX Brown),   Mouse: Logitech M950T,   Headphones: Audio Technica ATH PRO700MK2,   Speakers: Logitech Z906,   Phone: Google Nexus 5,   Tablet: Google Nexus 9

Link to comment
Share on other sites

Link to post
Share on other sites

Wow I feel dumb haha...

Thanks a bunch! :D

If you're new to programming: Start getting used to stuff like that :-)

MB: MSI Z77A-GD55 | CPU: Intel i5-2500k @ 4.5 GHz | RAM: 8GB Kingston DDR3 @1333MHz | GPU: Asus GTX 770 DirectCU II 

Monitor: 22" Samsung SyncMaster B2230H @60Hz | Audio: Creative Aurvana Live! | PSU: SuperFlower 80+ Gold 550 Watt 

OS: ArchLinux + KDE / Windows 8 Pro 64bit | Smartphone: Nexus 4 16GB - CM11

 

Link to comment
Share on other sites

Link to post
Share on other sites

Wow I feel dumb haha...

Thanks a bunch! :D

 

Don't be. Even the experienced programmers do that from time to time.

Link to comment
Share on other sites

Link to post
Share on other sites

A5HdRB-CIAAM3Ri.png

Interested in Linux, SteamOS and Open-source applications? Go here

Gaming Rig - CPU: i5 3570k @ Stock | GPU: EVGA Geforce 560Ti 448 Core Classified Ultra | RAM: Mushkin Enhanced Blackline 8GB DDR3 1600 | SSD: Crucial M4 128GB | HDD: 3TB Seagate Barracuda, 1TB WD Caviar Black, 1TB Seagate Barracuda | Case: Antec Lanboy Air | KB: Corsair Vengeance K70 Cherry MX Blue | Mouse: Corsair Vengeance M95 | Headset: Steelseries Siberia V2

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

man i had like a 500 line javascript useless web thing lol and i spelled something wrong, it took me ages to find........

CPU: i7 4770k@4.3Ghz GPU: GTX 780ti Motherboard: ROG maximus vi formula PSU: Evga supernova 1000w Platinum

Case: NZXT Switch 810 Memory: g.skill ripjaws X Cooler: Corsair h100i(getting custom loop when i get money next) Storage: Samsung 840 evo 250gb Keyboard: Corsair K95 Mouse: SteelSeries Rival

Link to comment
Share on other sites

Link to post
Share on other sites

man i had like a 500 line javascript useless web thing lol and i spelled something wrong, it took me ages to find........

In this case I would use something like Google Chrome JavaScript console, or a GUI like Microsoft Visual Studio 2012 in debug mode. both tools will stop on the beginning of the error and will show you where they stop. VS 2012 will give you hints on why it stop running the javascript code.

Michael Summers

CaseObsidian 900D  MOBORampage IV Extreme CPU:  i7-4960X Ivy Bridge-E 3.6GHz  RAM:: Vengeance Pro 32GB  Boot : RAID 0  840 Pro  512GB  Data:  RAID 10 WD Red  2TB PS: Corsair : AX1200 GPU:  ASUS  GTX-780 Ti

Birthday Gift from my wife - She made me order it and built it :-)

Link to comment
Share on other sites

Link to post
Share on other sites

In this case I would use something like Google Chrome JavaScript console, or a GUI like Microsoft Visual Studio 2012 in debug mode. both tools will stop on the beginning of the error and will show you where they stop. VS 2012 will give you hints on why it stop running the javascript code.

:o thank you so much!! lol 

CPU: i7 4770k@4.3Ghz GPU: GTX 780ti Motherboard: ROG maximus vi formula PSU: Evga supernova 1000w Platinum

Case: NZXT Switch 810 Memory: g.skill ripjaws X Cooler: Corsair h100i(getting custom loop when i get money next) Storage: Samsung 840 evo 250gb Keyboard: Corsair K95 Mouse: SteelSeries Rival

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×