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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:33:50+00:00 2026-05-25T19:33:50+00:00

Help! I’m trying to build a webpage using the excellent Tiny Scrollbar from www.baijs.nl.

  • 0

Help! I’m trying to build a webpage using the excellent Tiny Scrollbar from http://www.baijs.nl. However, i need to add some internal anchor links to jump down to the appropriate section of the content but this is proving to be a problem. (All the content, including the internal anchor links, are housed within the Tiny Scrollbar div containers).

See my basic mockup on http://jsfiddle.net/uy4hK/

My problem is that although the internal link is jumping down to the correct section, the scrollbar on the right is not updating to the correct position – it just stays at the top. There is an update method that can be used, and the demo also has a version of internal scrolling but using a number variable (200px) but i am unable to tweak this to make it work in my jsfiddle demo. I can’t really use a number because content can vary and the internal links are within the content inside the Tiny Scrollbar container.

Can anyone help?

  • 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-25T19:33:51+00:00Added an answer on May 25, 2026 at 7:33 pm

    jsFiddle: http://jsfiddle.net/fausak/uy4hK/2/

    I think you can pull this off with use of jQuery’s position() method. Try this:

    $('a[href^="#"]').click(function() {
        // Find the bottom of the box with the scrollbar
        // (close approximation: the top position of the last element in the box)
        var bottom = $('.viewport .overview').children().last().position().top;
    
        // Determine what position this internal link is located at
        // (if you use <a name=".."> you will need to change this,
        // right now it only matches element IDs like <h1 id="link0">
        var cur = $($(this).attr('href')).position().top;
    
        // If the position of the link is too low for the scrollbar in this box,
        // just set it to the bottom
        if (cur >= bottom - $('.viewport').height()) {
            cur = 'bottom';
        }
        else {
            cur = cur + 'px';
        }
    
        $('#scrollbar1').tinyscrollbar_update(cur);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Help! I'm getting this error when trying to connect using JAX-WS webservice call: java.lang.NoClassDefFoundError:
Help! I am using jQuery to make an AJAX call to fill in a
Help! I have a PHP (PHP 5.2.5) script on HOST1 trying to connect to
help me to manage IIS (what i am trying to do is create virtual
Help! I'm using the ASP.Net Login control on a Login page, but the Login
Help, I'm trying to create a new post in my wordpress blog with custom
HELP......Just moved to C# from vb and Im really lost with this. var ldapmembershipUser
help me please i'm having the following issue: I'm trying to read a XML
Help! I have two objects that i have created using different techniques in django;
Help! I have a clickonce app built and published using .Net 2.0. This app

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.