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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:25:41+00:00 2026-06-17T23:25:41+00:00

i have two division tag one for maintain overflow content and another contain the

  • 0

i have two division tag one for maintain overflow content and another contain the check box
when i click any check box i just need to scroll bar depending up on the check box
i.e there is 20 check box, 9-10 are visible, if you want other then you have to scroll scroll bar, but i want functionality like when i click on 9 check box and the user want to go forward then 10 check box come up automatic. this functionality already provided in hot mail for selecting the mail.

for that one i have use following

<div>
<div id="text" style="width: 500px; height:200px; border: solid 1px grey; overflow: scroll;">
    <input id="check1" type="checkbox" onclick="update(this.id)">Auto-scroll1<br>
    <input id="check2" type="checkbox" onclick="update(this.id)">Auto-scroll2<br>
    <input id="check3" type="checkbox" onclick="update(this.id)">Auto-scroll3<br>
    <input id="check4" type="checkbox" onclick="update(this.id)">Auto-scroll4<br>
    <input id="check5" type="checkbox" onclick="update(this.id)">Auto-scroll5<br>
    <input id="check6" type="checkbox" onclick="update(this.id)">Auto-scroll6<br>
    <input id="check7" type="checkbox" onclick="update(this.id)">Auto-scroll7<br>
    <input id="check8" type="checkbox" onclick="update(this.id)">Auto-scroll8<br>
    <input id="check9" type="checkbox" onclick="update(this.id)">Auto-scroll9<br>
    <input id="check10" type="checkbox" onclick="update(this.id)">Auto-scroll10<br>
    <input id="check11" type="checkbox" onclick="update(this.id)">Auto-scroll11<br>
    <input id="check12" type="checkbox" onclick="update(this.id)">Auto-scroll12<br>
    <input id="check13" type="checkbox" onclick="update(this.id)">Auto-scroll13<br>
    <input id="check14" type="checkbox" onclick="update(this.id)">Auto-scroll14<br>
    <input id="check15" type="checkbox" onclick="update(this.id)">Auto-scroll15<br>
    <input id="check16" type="checkbox" onclick="update(this.id)">Auto-scroll16<br>
    <input id="check17" type="checkbox" onclick="update(this.id)">Auto-scroll17<br>
    <input id="check18" type="checkbox" onclick="update(this.id)">Auto-scroll18<br>
    <input id="check19" type="checkbox" onclick="update(this.id)">Auto-scroll19<br>
    <input id="check20" type="checkbox" onclick="update(this.id)">Auto-scroll20<br>
    <script type="text/javascript">
        function update(checkID) {
            var box = document.getElementById("checkID");
            var tag = document.getElementById("text");
            tag.scrollTop = tag.scrollTop - 17;
            setTimeout('update(checkID)', 1000);
        }
    </script>
</div>
</div>

how to scroll scroll bar when user select check box from the list
and also if user selecting forward than scroll down or user select backward than scroll up as per the user requirement

please help me
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-06-17T23:25:41+00:00Added an answer on June 17, 2026 at 11:25 pm

    I think i did what you want. You will need jQuery for this.

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    
    <div id="text" style="width:500px;height:200px;border:solid 1px grey;overflow:scroll;">
        <input type="checkbox" />Auto-scroll1<br/>
        <input type="checkbox" />Auto-scroll2<br/>
        <input type="checkbox" />Auto-scroll3<br/>
        <input type="checkbox" />Auto-scroll4<br/>
        <input type="checkbox" />Auto-scroll5<br/>
        <input type="checkbox" />Auto-scroll6<br/>
        <input type="checkbox" />Auto-scroll7<br/>
        <input type="checkbox" />Auto-scroll8<br/>
        <input type="checkbox" />Auto-scroll9<br/>
        <input type="checkbox" />Auto-scroll10<br/>
        <input type="checkbox" />Auto-scroll11<br/>
        <input type="checkbox" />Auto-scroll12<br/>
        <input type="checkbox" />Auto-scroll13<br/>
        <input type="checkbox" />Auto-scroll14<br/>
        <input type="checkbox" />Auto-scroll15<br/>
        <input type="checkbox" />Auto-scroll16<br/>
        <input type="checkbox" />Auto-scroll17<br/>
        <input type="checkbox" />Auto-scroll18<br/>
        <input type="checkbox" />Auto-scroll19<br/>
        <input type="checkbox" />Auto-scroll20<br/>
    </div>
    
    <script type="text/javascript">
    $(function() {
        var ct = $('#text'),
            cboxes = $('input[type="checkbox"]', ct),
            lastChecked = null;
    
        cboxes.click(function() {
            if (!lastChecked)
                lastChecked = this;
    
            var _current = $(this),
                _last = $(lastChecked),
                cindex = cboxes.index(_current),
                lindex = cboxes.index(_last),
                t = null;
    
            //next
            if (cindex >= lindex) {
                t = $(cboxes[cindex + 1]);
                if (t) ct.animate({ scrollTop: ct.scrollTop() + t.height() * 1.5 }, 500);
    
            //prev
            } else if (cindex < lindex) {
                t = $(cboxes[cindex - 1]);
                if (t) ct.animate({ scrollTop: ct.scrollTop() - t.height() * 1.5 }, 500);
            }
    
            lastChecked = this;
        });
    });
    </script>
    

    see this

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

Sidebar

Related Questions

Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two classes (MVC view model) which inherits from one abstract base class.
I have two TABLEs from the US Census. One has 2.8 millions records in
I have two lists: total_price and units_b , which both contain null values and
I have two tables, NetworkAccount and Division. The are related by DivisionID NetworkAccount has
Hi i have two division with class named tick what i am trying to
I have two console apps (msvc 2008). When they have division by zero, they
I have two tables (subjects and pages) in one-to-many relations. I want to add
I have two divisions (menu and content). content's height is undefined so that it
I have two lists based on the same class. I would like one list

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.