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


  in vertical jquery menu

I have weird   tags in my vertical accordian menu renderd in the browser. This &nbsp's are not in the code and I can not find them. Can anybody help?

<ul id="nav"><li><a href="#" class="active">Rotwein</a>
&nbsp;&nbsp;&nbsp;&nbsp;<ul style="display: block;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 1 a</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 1 b</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 1 c</a></li>
&nbsp;&nbsp;<li><a href="#">Weisswein</a>
&nbsp;&nbsp;&nbsp;&nbsp;<ul style="">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 2 a</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 2 b</a></li>
&nbsp;&nbsp;<li><a href="#">Rosewein</a>
&nbsp;&nbsp;&nbsp;&nbsp;<ul style="">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 3 a</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 3 b</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 3 c</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 3 d</a></li>
&nbsp;&nbsp;<li><a href="#">Schaumwein</a>
&nbsp;&nbsp;&nbsp;&nbsp;<ul style="">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 4 a</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 4 b</a></li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#">Sub-Item 4 c</a></li>

&nbsp;&nbsp;<li><a href="#">Altro</a></li>
The Javascript: 


        $(document).ready(function () {
  $('#nav > li > a').click(function(){
    if ($(this).attr('class') != 'active'){
      $('#nav li ul').slideUp();
      $('#nav li a').removeClass('active');

$('#nav a.active').each(function(){


3 Answers

It looks like indentation of a certain editor. With what editor did you write this ?

At least here it is without   CLICK

I wrote this thing with coda 2

you actually were right. Code did some invisibale characters.