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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:21:38+00:00 2026-05-24T17:21:38+00:00

GChat keeps the textarea scrolled to the end when new text appears, however if

  • 0

GChat keeps the textarea scrolled to the end when new text appears, however if the user scrolls away from the end, it waits until you’ve scrolled back down to continue this behavior.

Using just HTML, Javascript and JQuery, how could one mimic this behavior?

  • 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-24T17:21:39+00:00Added an answer on May 24, 2026 at 5:21 pm

    Every time you add data, execute something like:

    this.scrollTop = this.scrollHeight;
    

    This is just standard Javascript that forces you to scroll to the bottom. To only force someone to stay scrolled to the bottom when they’re already at the bottom, do something like this:

    var elem = document.getElementById('myElementName');
    var atBottom = (elem.scrollTop >= (elem.scrollHeight - elem.clientHeight));
    // add your text updates here
    if(atBottom) elem.scrollTop = elem.scrollHeight;
    

    Example at http://jsfiddle.net/xjmha/4/

    (Ignore the other versions of the fiddle… I was failing with jQuery.)

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

Sidebar

Related Questions

I've got a button which when clicked copies and appends the text from a
How do I set a GChat or jabber status via python? Right now I've
i will have the following set up: people will be sending text messages to
I am using webkitgtk+ to get the .ico favicon from a website : const
Say I have to remove the last occurrence of a string from another string.
I'm fairly new to C programming and having some difficulties wrapping my brain around
I'm very new to Fortran. Currently I'm writing (or trying to write) a fortran
i am using event-source rpc plugging for data pushing from server side after a
While trying to compile wxWidgets-2.9.1 from source with c++0x flags using gcc-4.6 . I
I'm trying to extract some DNA info from a file. Before the DNA data

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.