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

jQuery not working

Hi, I am running electron and I am trying to add jquery to the page. I start writing my script and it does not perform the tasks I wan't. Plain JavaScript is working but jQuery is not running for some reason. File directory is correct.

<script src="jquery.js"></script>
    <script>
    $(document).ready(function(){
            $(".discover").click(function(){
                $(".discover_page").show();
                $(".charts_page").hide();
            });
        });
    </script>
    <script type="text/javascript" src="app.js"></script>

Hi Nils,

Just because I can't see it in the code above, have you linked to the jQuery CDN in your HTML?

The link can be found here: https://code.jquery.com/