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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:05:52+00:00 2026-06-05T12:05:52+00:00

http://jsfiddle.net/cbp4N/16/ If you show the div. Change the scroll position and then hide and

  • 0

http://jsfiddle.net/cbp4N/16/

If you show the div. Change the scroll position and then hide and show it agian the scroll position is lost.

am I doing anything wrong or is this a bug.
Is there a way round it with som plugins.

/Anders

Thanks for the answers and solutions. But what if the div that I hide is a outer div and the scrolling div is deep inside the div I hide. Is there a smart way to also fix this. Becuse now I cant set/save the scroll position in the callback of the hide/show

  • 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-05T12:05:53+00:00Added an answer on June 5, 2026 at 12:05 pm

    Jquery’s .scrollTop() works well if you maintain the position as data.

    $('#cbxShowHide').click(function(){
        if(this.checked) {
            $('#block').show('fast',function() {
                $(this).scrollTop($(this).data('scroll'));
            });
        }
        else {
           $('#block').data('scroll',$('#block').scrollTop());
            $('#block').hide('fast');
        }
    });
    

    example

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

Sidebar

Related Questions

http://jsfiddle.net/Greg_J/R5ZHk/ I'm appending a div to a container and then animating the height. The
http://jsfiddle.net/chovy/dk5Ua/ <div></div> var $span = $('<span>foo</span>'); $span.hide(); $(div).append($span); $span.fadeIn(); You'll notice the resulting span
http://jsfiddle.net/gUckp/ In the above demo, I'd like to show an orange round image BELOW
http://jsfiddle.net/xKuwR/ I want the small clone to sit nicely within the overview div. The
http://jsfiddle.net/CApW2/ I can't get it done the right way, left and right div are
http://jsfiddle.net/AndyMP/nUhhf/1/ This is a simplified situation where I have a DIV that animates downwards
http://jsfiddle.net/GNQyt/ Hover over green box, then move mouse to child list. Suddenly starts blinking
http://jsfiddle.net/VTD9P/2/ $(button).click(function(){ $(body).append('<div class=vidminclose>X</div>'); }); $(.vidminclose).click(function(){ $(this).remove(); }); ​ ​why is it when i
http://jsfiddle.net/kent93/AyEpR/ i want to hide() the loader gif , after the audio has loaded.
http://jsfiddle.net/BXNE9/1/ I want to open div through anchor point using related link. when I

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.