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
Ryan Canty
Courses Plus Student 5,665 PointsWhy when I copy and paste this codepen code into sublime text does the modal not work?
I am trying to get the code from this codepen (https://codepen.io/vajkri/pen/OPYqav) to work on my own computer. I am using sublime text and i have an index.html, modal.css, and a modal js and put each code into its own respective files and link them properly. but all that I get is the background and modal button, but when I click it nothing happens....
1 Answer
Patrik Horváth
11,110 Pointsyou need import JQUERY why ? because he using JQUERY in his JavaScript just check his code :) $ selector, .on() method and .....
also you can inspect his project and you will see
//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
Ryan Canty
Courses Plus Student 5,665 PointsRyan Canty
Courses Plus Student 5,665 PointsThanks for the answer! how exactly do I import the jquery? is it the same <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>?
Patrik Horváth
11,110 PointsPatrik Horváth
11,110 Pointsi hope this is just joke how u can search something on codepen and use it ? without knowing Basics ? go to Official JQuery site and find CND or download JQuery and direct link to it and i hope you use HTML 5 i never saw type in html 5 but okey
example :
Ryan Canty
Courses Plus Student 5,665 PointsRyan Canty
Courses Plus Student 5,665 PointsThis wasn't a joke Im pretty new to JavaScript
Patrik Horváth
11,110 PointsPatrik Horváth
11,110 Pointsthen sorry and you should go true Basic Course here in TeamTreeHouse and then go to API´s or Find inspiration on codepen