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 trialSam Alcaraz
6,637 Pointsneed help
in index.html <p class="spoiler"> <span>Darth Vader is Luke Skywalker's Father! Noooooooooooo!</span> <button>Reveal Spoiler</button> </p> <script scr="js/jquery-3.2.1.min.js"></script> <script src="js/app.js"></script> </body> </html>
thats in app.js $('.spoiler span').hide();
its saying theres an error with the $ not being identified
4 Answers
Michele Smolensky
9,261 PointsWhen calling in the jquery javascript file, it seems like you misspelled "src".
Munish Sharma
Full Stack JavaScript Techdegree Student 5,144 Points<p class="spoiler"> <span>Darth Vader is Luke Skywalker's Father! Noooooooooooo!</span> <button>Reveal Spoiler</button> </p> <script sRc="js/jquery-3.2.1.min.js"></script> <script src="js/app.js"></script> </body> </html>
I changed it where is the mistake. I hope It help.
Martin Dimitrov
Courses Plus Student 8,868 PointsInclude JQuery in the <head> tag
Camille Le
5,408 PointsHey there, this code below includes the src
attribute. This will allow you to load the jQuery library before your jQuery code in app.js. Hope this helps.
<body>
<img src="img/deathstar.png" />
<p class="spoiler">
<span>Darth Vader is Luke Skywalker's Father! Noooooooooooo!</span>
<button>Reveal Spoiler</button>
</p>
<!-- Include the src attribute in the script tag -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/app.js"></script>
</body>