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 trial

JavaScript jQuery Basics (2014) Introduction to jQuery Ways to Include jQuery in a Project

Juan Ordaz
Juan Ordaz
12,012 Points

This is the Code that works on Firefox.

In the video it shows that you have to copy an paste the DSN script. In firefox and chrome the script doesn't work.

Wrong code:

.html

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>

Right code:

.html

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>

In the query file, everything is correct.

Richard Barkinskiy
Richard Barkinskiy
10,663 Points

Are you working in Workspaces, or on a separate local version of the project on your computer?

1 Answer

Richard Barkinskiy
Richard Barkinskiy
10,663 Points

If you're viewing the website locally on your computer, the link won't work without the "http" but if it's being served from a server, then it will work without the "http"

Juan Ordaz
Juan Ordaz
12,012 Points

Thank you, I did not know the reason why this didn't work. I just knew there was something missing. I was working on my Rails app using jQuery, so when I was doing this exercise it got me off guard. I wasn't paying attention and I wasn't sure why.