Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9111769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:34:57+00:00 2026-06-17T03:34:57+00:00

I have a problem with programming jQuery and I hope that you can help

  • 0

I have a problem with programming jQuery and I hope that you can help me even if a speak english like an alien %).

I’m doing a site with horizontal scrolling, you can see it here http://www.kinetics.ru/index_kin.html
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’.

The code is:

<div class="menu">
        <ul class="nav">
           <li id="main"><a href="#about"><img src="img/menu/about.png" /></a></li>
           <li><a href="#uslugi"><img src="img/menu/uslugi.png"/></a></li>
           <li><a href="#portfolio"><img src="img/menu/portfolio.png"/></a></li>
           <li><a href="#clients"><img src="img/menu/clients.png"/></a></li>
           <li><a href="#contacts"><img src="img/menu/contacts.png"/></a></li>
        </ul>
    </div>
...
<div class="bottomNav" style="position: absolute; z-index: 11">
<div style="height: 26px; width:98px; margin:-75px 0 0 500px; position: fixed" class="back"><img src="img/back.png"</div>
<div style="height: 26px; width:114px; margin:-25px 0 0 600px; position: fixed" id="next"><img src="img/forward.png"</div>

And my not working jQuery code for next btn:

$('bottomNav, #next img').click(function(){
    if ($('ul.nav').find('img').hasClass('on')){
        $('ul.nav').next().click();
    }
});   

Also I’ve tried to do like this:

    $('bottomNav, #next img').click(function(){
    $('ul.nav img').click(function(){
        if ($(this).hasClass('on')){
            $(this).next().click();}
    });
});   

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T03:34:58+00:00Added an answer on June 17, 2026 at 3:34 am

    You have to review jQuery selectors and as well your HTML code, it’s terribly wrong. Firebug says:

    enter image description here

    I modified your code in proper way:

    <div class="bottomNav" style="position: absolute; z-index: 11">
        <div id="prev" style="height: 26px; width:98px; margin:-75px 0 0 500px; position: fixed">
            <img src="img/back.png" />
        </div>
        <div id="next" style="height: 26px; width:114px; margin:-25px 0 0 600px; position: fixed" >
            <img src="img/forward.png" />
        </div>
    </div>
    

    JavaScript (It’s pretty simple and I didn’t test it, but it should give you an idea).

    $('#prev').click(function () {
        var $activeLi = getActiveLi();
        var $prevLi = $parentLi.prev();
    
        if ($prevLi.length > 0) {
            $prevLi.find('a').click();
        }
    });
    
    $('#next').click(function () {
        var $activeLi = getActiveLi();
        var $nextLi = $parentLi.next();
    
        if ($nextLi.length > 0) {
            $nextLi.find('a').click();
        }
    }); 
    
    function getActiveLi() {
        var $activeImg = $('.menu .nav img.on');
        var $activeLi = $activeImg.closest('li');
    
        return $activeLi;
    };
    

    But beeing seriously: before continuing developing your web site you seriously should put some effort in learnin hot to use jQuery and how to structure HTML…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn some programming with jQuery. I have a div that has
I have a problem programming with Android SDK 1.6. I'm doing the same things
I can't wrap my head around the following Stata programming problem: I have a
While programming i have some problem with Encoding.. In United States En-US like Norweigian
I have a pretty simple general programming problem, yet I can't quite get the
I have a programming problem in Java: Can I define a different method for
everyone, i have a problem in bash programming, that is I don't know what's
I have this programming problem, I'm using C#. I want to check if varA
I have one problem with android calendar programming, so If there are 2 months
I have a question about a programming problem from the book Cracking The Code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.