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 Introduction to jQuery Hello, jQuery! The jQuery Object

I Launched the workspace from this video but when i preview the page and click the <Li> it does not say clicked.

I Launched the work spaces from this video but when i preview the page and click the <Li> it does not say clicked. Why this happens?.

Basilissa Albers
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Basilissa Albers
Full Stack JavaScript Techdegree Graduate 23,755 Points

It's because you haven't linked to jQuery, therefore the error "Uncaught ReferenceError: $ is not defined" is displayed. Link to jQuery in index.html before linking to app.js and it should work.

Thank you, Basilissa Your answer helped my a lot thanks a lot!.

1 Answer

Tsenko Aleksiev
Tsenko Aleksiev
3,819 Points

in your HTML, above the closing body tag, and above another script tag ( if you have any ), add this:

<script
  src="https://code.jquery.com/jquery-3.2.1.min.js"
  integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
  crossorigin="anonymous"></script>

without this you can't use jQuery. Offcourse there is another way ( more than one actually ) on how to include jQuery to your code. Rewatch the videos again. :) Hope I helped