title: jquery find li with certain class and add another class
body: <p>I'm not getting how to loop a ul and just add a class if li has class='parent'</p>
  
  <p>I always get each li with my new class...</p>
  
  <p>this is the code</p>
  
  <pre><code>$('.navigation').find('li').each(function() {
          if($(this).hasClass('parent')) {
              $(this).find('li').each(function() {
                  $(this).addClass("nivel_1");
                  $(this).css('display', 'none');
                  if($(".nivel_1").hasClass('parent')) {
                      $(".nivel_1").find('li').each(function() {
                          $(this).addClass("nivel_2");
                          $(this).css('display', 'none');
                      });
                  }
              });
          }
      });
  </code></pre>
  
  <p>this is what i get</p>
  
  <p><img src="https://i.stack.imgur.com/ErzpJ.png" alt="all items get nivel_1"></p>
  
  <p>what should i do?</p>
  
  <p>thanks!</p>
  
  <p>Pluda</p>