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

WordPress WordPress Theme Development Building Out WordPress Navigation The wp_nav_menu Function

Micah Dunson
Micah Dunson
34,368 Points

Browser is saying ReferenceError: JQuery is not defined

I have everything set up accordingly and everything has been going smoothly except Jquery is not loading

JQuery(document).ready(function($) { $( ".nav-toggle" ).click(function() { $(this).toggleClass("open"); $("nav").fadeToggle(100); return false; }); });

this is the code . Any suggestions?

2 Answers

Tobias Helmrich
Tobias Helmrich
31,602 Points

Hey Micah,

try writing jQuery instead of JQuery. I think you have to write it with a lowercase "j" if you write it that way. I hope that helps! :)

Micah Dunson
Micah Dunson
34,368 Points

Yep..that's exactly what it was. I knew it was something small. Thanks.

Mike Ferrari
Mike Ferrari
3,239 Points

Hey Guys, I also am having the same reference error in the browser and nav button is still not working after changing the '/js/foundation.min.js'. I tried changing the J to j with no luck. Here is the code in the app.js file now: jQuery(document).ready(function($) {

$(document).foundation();

$( ".nav-toggle" ).click(function() {
$(this).toggleClass("open");
 $("nav").fadeToggle(100);

return false;
});

});

I tried it with $(document).foundation(); and without. No luck. Any help would be greatly appreciated.