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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:41:47+00:00 2026-05-16T14:41:47+00:00

I am using .slideToggle – Jquery to create an accordion and It works so

  • 0

I am using .slideToggle – Jquery to create an accordion and It works so far.

However, When div#slickbox goes down or up the page does not scroll with it. The page maintain scroll position.

I have 2 huge images(700px x 1300px) inside div#slickbox.

I want to scroll the page with the content, down & up.

How can I do this?

Thank you!

jquery

      $('#slickbox').hide();

  $('.more a').click(function() {

    $('#slickbox').slideToggle(3200);

    return false;

  });

HTML

<div id="slickbox">
 <div id="slide_show">
  <div id="slider">
       <ul>
    <li>
     <img alt="figure 1" src="images/fig1.jpg" width="700" height="1300">

  </div><!-- End slide_show -->
</div><!-- End slickbox -->

<div class="donate done">
    <h3 class="more"><a href="#" title="More"> More </a></h3>
</div> <!-- End button-->                                                    

  • 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-16T14:41:47+00:00Added an answer on May 16, 2026 at 2:41 pm

    You can store the .height() of the #slickbox element then use that as the animation for scrollTop, like this:

    var height = $('#slickbox').hide().height();
    $('.more a').toggle(function() {
        $('#slickbox').slideDown(3200);
        $('html, body').animate({ scrollTop: '+=' + height }, 3200);
        return false;
    }, function() {
        $('#slickbox').slideUp(3200);
        $('html, body').animate({ scrollTop: '-=' + height }, 3200);
        return false;
    });​
    

    You can give it a try here, this will cause the page to scroll down the same number of pixels it expanded because of the images, and at the same rate since it has the same duration.

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

Sidebar

Related Questions

I'm using this jQuery to hide a DIV: $(#slider).click(function() { $(.help).slideToggle(); $(#wrapper).animate({ opacity: 1.0
I'm trying to create an accordion type menu using the following JQUERY: function initMenu()
I have a sliding div on my page which is using jQuery, I'd like
I am using Jquery load() to load external pages inside a DIV, so far
I am using slidetoggle to open and close div, with easing using jquery. <script>
I'm new to jQuery. I'm using .slideToggle to make a DIV appear at the
I'm just using a simple slideToggle function of jQuery. It works properly in my
I am using Jquery Accordian in my page, Here is the HTML, <div class=forms-cont>
I came across this great JQuery example of using a slidetoggle. I want to
I have multiple menus that are using .slideToggle (im learning jQuery currently). Using online

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.