k_mckraken Posted September 5, 2015 Share Posted September 5, 2015 So, I was using WebMatrix 3 initially, but decided to transfer over to Notepad++ because my jQuery file wasn't running. Upon doing so, I moved the main folder onto my desktop for quicker access and now the links to my SVG logo files are broken. The SVG files were located in their own folder within the main folder. The file structure within the main folder is the same, so why are my images missing? The rest of the CSS is working , so I know that it's still properly linked to the HTML file. Also, a side note: I'm pretty sure my jQuery file is linked properly, but none of the functions are working... any solutions there? <!DOCTYPE html><html> <head> <title>Template Site | Welcome!</title> <link type="text/css" rel="stylesheet" href="site.css"/> <script type="text/javascript" src="script.js"></script> </head> And the CSS: .logo-tag { display: inline-block; height: 100px; width: 100px; background-image: url("../SVG/NSV2.svg"); float: left; And the jQuery, if anyone is interested: $(document).ready(function() { $(".splash-sqr-med").mouseenter(function() { $(this).fadeTo("fast", 0.1); });}); Any help is greatly appreciated! Thank you! Link to comment Share on other sites More sharing options...
davej Posted September 6, 2015 Share Posted September 6, 2015 Why isn't jQuery itself mentioned in your html head above? Overall this is a simple problem but unless you describe your file folder hierarchy there isn't much we can say. Link to comment Share on other sites More sharing options...
k_mckraken Posted September 6, 2015 Author Share Posted September 6, 2015 I have the jQuery file listed as the script.js file. That's how I was taught to save and link it. My folder hierarchy is this: C:Users(username)DesktopNeverSleep_Demo The NeverSleep_Demo folder contains the HTML, CSS, and JS files along with two folders labelled IMG and SVG. Within the SVG folder are the AI and SVG files for the logos. I hope this was helpful. Link to comment Share on other sites More sharing options...
davej Posted September 6, 2015 Share Posted September 6, 2015 If script.js is actually jquery-2.1.4.min.js then where is the jQuery code you posted above? Also it would seem that... background-image: url("../SVG/NSV2.svg"); ...should be... background-image: url("./SVG/NSV2.svg"); Link to comment Share on other sites More sharing options...
k_mckraken Posted September 6, 2015 Author Share Posted September 6, 2015 Thank you for the help! And I'm not sure what you mean about the jQuery stuff.I've only practiced it in online courses that supplied the editor window, so I'm not really sure how to implement the code properly. I'm still new with jQuery. Link to comment Share on other sites More sharing options...
davej Posted September 6, 2015 Share Posted September 6, 2015 jQuery is a library, and then you write your own code which uses that library, so I don't understand what you are doing. http://www.w3schools.com/jquery/jquery_get_started.asp Link to comment Share on other sites More sharing options...
k_mckraken Posted September 6, 2015 Author Share Posted September 6, 2015 (edited) Well, I learned jQuery, initially, from codecademy.com who didn't explain that part, probably because their editor has it built in. I'll look over the tutorial on w3schools and see what I need to do. Thank you for the help! EDIT: Also, the CSS fixed worked and I solved my jQuery issue, thanks again! Edited September 6, 2015 by k_mckraken Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now