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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:49:42+00:00 2026-05-16T17:49:42+00:00

Is there a jQuery technique to select all the page controls/divs with a non-zero

  • 0

Is there a jQuery technique to select all the page controls/divs with a non-zero scrollbar position?

I’m trying to solve a problem faced by many; essentially after a partial asp.net postback all the controls/divs that had a scrollbar with a non-zero value (ie: were scrolled down to some position) are reset to the zero (top of the scrollbar).

My approach is to have a jQuery script save all the scrollbar positions for all the controls/divs contained on a page and after the postback, restore all the scroll bar positions.

Is it possible, can it even work? If it is, how do I use jQuery to select all the divs with scrollbars and then save those positions.

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-16T17:49:42+00:00Added an answer on May 16, 2026 at 5:49 pm

    As far as I know, there is no way to select elements by whether or not they have a scrollbar. If I were to do this, I think my approach would be to target elements that could have scrollbars, then test to see if the scrollTop = 0. For example:

    $('div, select[size]').each(function() {
         //test for non-zero scrollTop
         if ($(this).scrollTop() != 0) {
             //save the element by id and the scrollTop value
             //maybe use a cookie, or a string that can be passed
             //between server and client
         }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a jQuery type function to solve the problem of walking through nested
Is there any jQuery plugin or CSS technique to achieve this pop effect like
Is there a jQuery plugin or effect that will create an overlay/lightbox effect around
Are there any jQuery sliders with a loading bar? I have seen them on
Is there a jQuery way to perform iteration over an object's members, such as
Is there a jQuery project out there, that create on of these Password-strength-meters right
Is there any jquery plugin for implementing iGoogle style dashboard? So basically drag n
Is there a jquery plugin that when you hover over an icon etc. it
Is there a jQuery plugin or javascript library that supports a genie animation effect
Is there a jquery way or plugin to detect the visitor's browser window size

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.