title: jQuery Click on next element
body: <p>I have a problem with programming jQuery and I hope that you can help me even if a speak english like an alien %).</p>
  
  <p>I'm doing a site with horizontal scrolling, you can see it here <a href="http://www.kinetics.ru/index_kin.html" rel="nofollow">http://www.kinetics.ru/index_kin.html</a>
  I have a menu at the left and two buttons PREV and NEXT at the bottom.
  Menu is working correctly, but I need to let the bottom buttons work.
  By clicking for example on NEXT I need that code made a click on next menu btn after the one that have style 'on'.</p>
  
  <p>The code is:</p>
  
  <pre><code>&lt;div class="menu"&gt;
          &lt;ul class="nav"&gt;
             &lt;li id="main"&gt;&lt;a href="#about"&gt;&lt;img src="img/menu/about.png" /&gt;&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#uslugi"&gt;&lt;img src="img/menu/uslugi.png"/&gt;&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#portfolio"&gt;&lt;img src="img/menu/portfolio.png"/&gt;&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#clients"&gt;&lt;img src="img/menu/clients.png"/&gt;&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#contacts"&gt;&lt;img src="img/menu/contacts.png"/&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  ...
  &lt;div class="bottomNav" style="position: absolute; z-index: 11"&gt;
  &lt;div style="height: 26px; width:98px; margin:-75px 0 0 500px; position: fixed" class="back"&gt;&lt;img src="img/back.png"&lt;/div&gt;
  &lt;div style="height: 26px; width:114px; margin:-25px 0 0 600px; position: fixed" id="next"&gt;&lt;img src="img/forward.png"&lt;/div&gt;
  </code></pre>
  
  <p>   </p>
  
  <p>And my not working jQuery code for next btn:</p>
  
  <pre><code>$('bottomNav, #next img').click(function(){
      if ($('ul.nav').find('img').hasClass('on')){
          $('ul.nav').next().click();
      }
  });   
  </code></pre>
  
  <p>Also I've tried to do like this:</p>
  
  <pre><code>    $('bottomNav, #next img').click(function(){
      $('ul.nav img').click(function(){
          if ($(this).hasClass('on')){
              $(this).next().click();}
      });
  });   
  </code></pre>
  
  <p>P.S. Sorry for my noobish question. I just got a task at work to make a site and nobody cares that a designer is NOT the same as web-designer. I have no possibility to learn first, I have to learn and do at same time.</p>