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 3984602
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:47:23+00:00 2026-05-20T05:47:23+00:00

this is kinda tricky to explain,but here goes….I have multiple hidden divs that swap

  • 0

this is kinda tricky to explain,but here goes….I have multiple hidden divs that swap with one another when clicking a link using

$(document).ready(function(){
  $('a').click(function () {
    var divname= this.name;
    $("#"+divname).show("slow").siblings().hide("slow");
  });
});

I have also made a slider function which works great, but when the div changes the slider will not work. How can I get it to target the hidden div when they are called up? I assume its a variable thing?

this is my slider code

$(function() {
var scrollPane = $('#info'),
    scrollableHeight = scrollPane.height() - scrollPane.parent().height() || 0;

$("#slider-vertical").slider({
  orientation: "vertical",
  range: "max",
  min: 0,
  max: scrollableHeight,
  value: scrollableHeight,
  slide: function(event, ui) {
    scrollPane.css({top: ui.value - scrollableHeight});
  }
});

});

here is a working example to better understand…..please excuse the messy code

http://www.kerrydean.ca/tizzest.html#

thanks in advance

  • 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-20T05:47:24+00:00Added an answer on May 20, 2026 at 5:47 am

    Your slider is only set to scroll the #info div when you set var scrollPane, and not your other two divs (#info2 and #info3). Instead give your all sliding divs a shared class, such as class="info" and set scrollPane like so:

    var scrollPane = $('.info'),
        scrollableHeight = scrollPane.height() - scrollPane.parent().height() || 0;
    

    Then make sure you set your slider to a default position when showing/hiding your divs:

    $(document).ready(function(){
      $('a').click(function () {
        var divname= this.name;
        $("#"+divname).show("slow").siblings().hide("slow");
    
        // Reset slider to top
        var max = $("#slider-vertical").slider("option", "max);
        $("#slider-vertical").slider("value", max);
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is kinda oddball, but I was poking around with the GNU assembler today
I have a list of error codes I need to reference, kinda like this:
This is probably a kinda commonly asked question but I could do with help
I'm kinda stuck with this one so I hoped someone could help me. I
I know questions of this kind have been asked before, but my situation differs
I have ask this kind of question before, but it seems my previous question
This is a really tricky question to ask as its very hard to explain
i know this is kinda retarded but I just can't figure it out. I'm
I'm not sure if many people know about this text-editor? jEdit was kinda big
this kind of follows on from another question of mine. Basically, once I have

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.