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 AJAX Basics (retiring) jQuery and AJAX Introducing jQuery

raul cortes
raul cortes
5,745 Points

jquery code doesnt work and i used the link in video help pls

i used the workspace and jquery is not working...i added the link as video shows

3 Answers

Pedro Sousa
seal-mask
.a{fill-rule:evenodd;}techdegree
Pedro Sousa
Python Development Techdegree Student 18,546 Points

Hey raul,

You need to make sure that you include the jquery framework before any other script file or block that is using it.

For instance, this will not work:

<script>
     $("body").html("...");
</script>
<script src="http://code.jquery.com/jquery-1.11.0.min.js" ></script>

But this will:

<script src="http://code.jquery.com/jquery-1.11.0.min.js" ></script>
<script>
     $("body").html("...");
</script>

Also, make sure the link path you're using is working. Copy and paste it on your browser's navbar and it should give you the jQuery file itself.

Hope this helps.

,Pedro

raul cortes
raul cortes
5,745 Points

I guess I did it right, but i didnt test the link. So it helps a lot! Thx for your time, I appreciate your help :)

jason chan
jason chan
31,009 Points
$( document ).ready(function() {
    console.log( "ready!" );
});

https://learn.jquery.com/using-jquery-core/document-ready/