Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialParker Miller
3,922 PointsjQuery not making a difference to my webpage... Browser Issue?
Since the beginning of this course, none of my jQuery code has been effective at all. The entire last section it didn't work either, but I figured it was just something wrong that wasn't worth fixing, and that it would work on the next section. But even now, it still isn't working. In the last section I checked my code over and over again to make sure it is exactly like Andrew's, but still the webpage is no different. I am suspecting is has to do with the settings in my browser? I used Chrome by the way. Any help is beyond appreciated, I just want to get on with jQuery!!!!!!!
Here are the snapshot of my code https://w.trhou.se/w54we314fh
5 Answers
Parker Miller
3,922 PointsHey there, Nemanja. Under JavaScript in Content Settings, I have the box checked for "Allow all sites to run JavaScript". My JavaScript has always worked fine. It is only jQuery that I am writing which is not working at all.
Nazmus Sarwar
5,625 PointsTry this instead of that script src for jQuery. Tell me if this works!
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
miikis
44,957 PointsHey Parker,
Change the jQuery link in your HTML to this:
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
instead of this:
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
It should work now.
If you had been running a local web server on your computer, leaving the http:// off would have been perfectly acceptable. As it stands, the html file was trying to locate the jQuery file from within your file system... as opposed to on jQuery's server. Hopefully, that makes sense.
Parker Miller
3,922 PointsHey Nazmus and Mikis. I tried both of your solutions and still my code did not work.
Is there a way for me to download jQuery and use it as a file in workspaces so that I can just reference it from the local directory on my workspaces sidebar files?
Parker Miller
3,922 PointsUPDATE:
It works now. I cleared my browser history and a few other things I don't remember, maybe the cache or something, and it works now. I remember this happened to the CSS I was trying to use in workspaces when I did the CSS course. Thanks for the help everybody, you guys all have great attitudes and are great people!
Nemanja Miljkovic
Courses Plus Student 15,034 PointsNemanja Miljkovic
Courses Plus Student 15,034 PointsHi. Try to check this: In the top-right corner of the browser window, click the Chrome menu. Select Settings. At the bottom, click Show advanced settings. Under "Privacy," click the Content settings button. Find JavaScript section and check which option is checked.