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 trialJunmin Lee
1,544 PointsNot working in other editor
When I launch the workspace and try the toggleClass code, it works fine But when I use my own editor, the toggle does not work. does anybody else have a similar issue?
Ari Misha
19,323 PointsHiya Junmin! Like Justine said , be sure to link the code. Also did you download the files from the workspace in order to get you up and running with the existing code you need to work with?
1 Answer
Alejandro Narvaja
Courses Plus Student 7,340 PointsThe first thing you have to do in your code editor is to link to the jQuery CDN by adding this line in your HTML:
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
That should work everything you use with jQuery.
Justin Radcliffe
18,987 PointsJustin Radcliffe
18,987 PointsHey Junmin, be sure you're correctly linking to both the css and js files in your index.html.