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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:09:24+00:00 2026-05-23T05:09:24+00:00

I am working on a webpage which uses accordion div elements to expand and

  • 0

I am working on a webpage which uses accordion div elements to expand and contract the content of each title. I am also using a custom scrollbar that needs to get updated whenever either an expand or a contract event happens.
So far the solution i came up with is to use jquery’s live like below:

jQuery(‘#accordion_sp1_id139’).live(‘click’,function(){ myScrollBar.update();});

So basically i am telling it to update the scrollbar anytime a click event occurs within the main accordion div.

My problem is that this doesn’t work the first time anything is clicked inside that div, but it works on any subsequent clicks. Is there anyway to make it work on the first click also.

Here is the page with the problem: https://www.arrowandbranch.com/media/press
the scrollbar i use is jquery plugin taken from http://www.baijs.nl/tinyscrollbar/

  • 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-23T05:09:25+00:00Added an answer on May 23, 2026 at 5:09 am

    I believe what’s going on here is your click event for your Accordion container is firing directly after the click event to start the accordion animation but before the container is expanded. You’ll need to set your myScrollBar.update() call to happen after the Accordion animation has completed which is mentioned in the documentation for the MooTools Docs – Fx/Fx.Accordion (although it doesn’t quite stand out at first)

    in your Accordion script add an onComplete: setting to run your scrollbar update…

    var myAccordion139 = new Accordion(document.getElements('#accordion_sp1_id139 .toggler'), document.getElements('#accordion_sp1_id139 .sp-accordion-inner'), {
        opacity: true,
                display:-1,
                alwaysHide: true,       
        onActive: function(toggler){
            toggler.addClass('active');
        },
        onBackground: function(toggler){
            toggler.removeClass('active');
        },
        onComplete: function(toggler) {
            myScrollBar.update();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working webpage which just displays external html files inside a div
Is there an easy way of working out which elements on a webpage will
I've been working through the tutorials on this webpage which progressively creates a bootloader
I'm working on a quite simple Webpage (MVC2), using localisation based on Resource Files.
Currently i'm working on my final year project. In a webpage which loads data
I'm working on a Firefox-plugin which searches a webpage for all textareas and places
I'm working on a project which is using Selenium and I'd like to try
I'm am working on a little chrome extension which uses the contextMenu to add
Lately I've been working in an office with a wireless network which uses an
I'm working on application which has workflow like this: 1.parsing home page (using HttpURLConnection,

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.