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

  • Home
  • SEARCH
  • 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 6817755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:05:40+00:00 2026-05-26T21:05:40+00:00

I basically have a div with set dimensions and overflow: hidden . That div

  • 0

I basically have a div with set dimensions and overflow: hidden. That div contains 7 child divs (but only shows one at a time) that I would like to be smoothly scrolled through vertically when their respective links are hovered.

However, the first section (div) doesn’t have a link and is the default section when no link is hovered.

Take a look at this jsFiddle to see a basic structure of what I’m talking about: http://jsfiddle.net/YWnzc/

I’ve attempted to accomplish this with jQuery scrollTo but haven’t been able to get it to work.

Any help would be greatly appreciated. Thanks.

  • 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-05-26T21:05:40+00:00Added an answer on May 26, 2026 at 9:05 pm

    Something like this?

    http://jsfiddle.net/YWnzc/5/

    code:

    jQuery("#nav").delegate("a", "mouseenter mouseleave", function (e) {
        var i, self = this,
        pos;
    
        if (e.type == "mouseleave") {
        i = 0;
        }
        else {
        //Find out the index of the a that was hovered
            jQuery("#nav a").each(function (index) {
                if (self === this) {
                i = index + 1; //the scrollTop is just calculated from this by a multiplier, so increment
                return false;
                }
            });
        }
    
        //Find out if the index is a valid number, could be left undefined
        if (i >= 0) {
    
            //stop the previous animation, otherwise it will be queued
            jQuery("#wrapper").stop().animate({
            scrollTop: i * 200
            }, 500);
            //I would retrieve .offsetTop, but it was reporting false values :/
        }
    
        e.preventDefault();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function called testimonials() that basically cycles through a set of divs,
basically I have 4 images with divs set up like this: <div id=selector> <div
Basically, I have a DIV, which I've set to z-index: 100. I have an
Basically I have a div at the very top of my site that I
I have a DIV that contains user-generated contents. These contents may and will start
I have a div element that I'm trying, basically, to move wherever the user
I have a set of divs like so: <div id=textArea> <div id=text></div> </div> CSS
So Basically I have a <div> which contains two buttons. I want to position
I have a DIV that slides open to the height of the content, but
Background: I have a dropdown menu that basically works the same as the one

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.