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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:48:41+00:00 2026-05-21T23:48:41+00:00

Using the example from jQuery UI , I tried dynamically adding a section to

  • 0

Using the example from jQuery UI, I tried dynamically adding a section to the accordion (based on this), but I can’t get the accordion to resize properly. The new section overflows the accordion container, and when it’s clicked, it gets squished into the container, hiding the section contents. See fiddle.

How can I add a section and get the accordion to resize?

$(function() {
    $("#accordion").accordion({
        fillSpace: true
    });

    // I want to dynamically add sections to the accordion,
    // but it doesn't resize properly...
    $("#accordion")
                .append('<h3><a href="#">New Section</a></h3><div><p>hello world</p></div>')
                .accordion("destroy")
                .accordion({ fillSpace:true })
                .accordion("resize")
        ;

    $("#accordionResizer").resizable({
        minHeight: 140,
        resize: function() {
            $("#accordion").accordion("resize");
        }
    });
});
  • 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-21T23:48:41+00:00Added an answer on May 21, 2026 at 11:48 pm

    If you remove the height attribute on the accordionResizer (height:220px), everything works as it should. It looks like the height you’ve picked is too low for the contents – hence the overflow.

    If you need something other than the default height to fit the contents, try dynamically assigning the height of the accordionResizer each time you add a new section.

    something like…

    var height = $("#accordion h3").size() * $("#accordion h3:first").height() + 50;
          // add 50px to     allow room for the section contents.
    $("#accordionResizer").height(height);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to extract EXIF information from images using jQuery. I've tried using a
I'm using JQuery to get city data from geonames. My problem is when I
I'm using JQuery UI Autocomplete to pull records from a caller database. This works
I want to get tag the names from a page using jquery so I
I am using the superfish menu from this example: http://users.tpg.com.au/j_birch/plugins/superfish/#examples (with Supersubs). It works
I am using the example from TheElements sample code provided with the iPhone SDK
I'm working for the first time with Forms Authentication, I'm using an example from
For example, mysql quote table name using SELECT * FROM `table_name`; notice the `
i'm using this example implementation found at http://tangentsoft.net/wskfaq/examples/basics/select-server.html This is doing most of what
Just starting learning about ajax requests using jQuery. I've tried looking at other posts

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.