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

The Archive Base Latest Questions

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

I have an element that is dynamically resized by code from a plugin. its

  • 0

I have an element that is dynamically resized by code from a plugin.
its the custom scroll bar plug in located Here.

So I’m using it for this little global chat thing I’m making, and basically, I’m polling the database to see if there are new messages, and if there are I’m updating the chat box and resizing. THat all works fine.

Whats not working correctly, is that I have it set to auto scroll to the bottom on each update. However this can be annoying if youre trying to look at things in the past at the top of the box. So basically I’m thinking that I can check to see if the sliderule of the scroll bar is at the exact bottom then keep it there using the plugins bottom function. But if its not at exactly 0 then just leave it where it is.

However, I’m unaware of a jquery function to that gets bottom on the fly like that.

When i try

alert($('.mCSB_container').css('bottom'));

its just saying : auto;

Anyone know of a function or way to calculate this?

Heres the html rendered by the plugin:

<div id="chat_messages_wrap" class="scrollbox mCustomScrollbar _mCS_1">
   <div class="mCustomScrollBox" id="mCSB_1" style="position:relative; height:100%; overflow:hidden; max-width:100%;">
      <div class="mCSB_container mCS_no_scrollbar" style="position: relative; top: 0px; ">                                              
         <div class="message_wrap" id="message_57">
            <span class="message_time">Mon Oct 08 2012 17:57:01</span>
            <div class="message_avatar_wrap"><img src="..."></div>
            <div class="message_message_wrap">
               <span class="message_username">EyeptchsRLame</span>
               <p class="message_message">hey there</p>
            </div>
            <div class="message_divider"></div>
         </div>
      </div>
      <div class="mCSB_scrollTools" style="position: absolute; display: none; ">
         <a class="mCSB_buttonUp" style="display:block; position:relative;"></a>
         <div class="mCSB_draggerContainer" style="position:relative;">
            <div class="mCSB_dragger" style="position: absolute; top: 0px; ">
               <div class="mCSB_dragger_bar" style="position:relative;"></div>
            </div>
            <div class="mCSB_draggerRail"></div>
         </div>
         <a class="mCSB_buttonDown" style="display:block; position:relative;"></a>
      </div>
   </div>
</div>
  • 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-12T12:33:53+00:00Added an answer on June 12, 2026 at 12:33 pm

    You can find the bottom of an element by finding top value then adding the height

    var obj = $('.mCSB_container');
    var bottom = obj.position().top + obj.height();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a virtual class Element that forces its derived classes to have a
I have a <select> element that I dynamically populate with different values at runtime.
I have code that I expect to return the element name, but nothing is
Is it possible to have checkboxes with a gridview that is dynamically generated from
It may be trivial, but I have following code that is dynamically adding some
I have a third-party js function that dynamically adds/removes options to a SELECT element
I have some jQuery that is dynamically creating a span element with a certain
I have a portion of code that is dynamically loaded via an AJAX call
I have a <div> element that I want to dynamically add some HTML <a>
I have a GridView that I need to dynamically add TemplateField elements to. My

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.