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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:08:12+00:00 2026-06-12T03:08:12+00:00

New to Bootstrap and having some issues with accordion. Hoping someone would help me

  • 0

New to Bootstrap and having some issues with accordion. Hoping someone would help me resolve it.

Basically I have an empty accordion and a drop down menu. Every time a selection made in the drop down menu, it is added to the accordion, with full .accordion-group mark up, but with empty .accordion-body div. After that this accordion-group set as droppable and .ui-droppable class is automatically added.

After that I am able to drag and drop a bunch of other divs into the .accordion-group and those divs are appended to .accordion-body of this particular group. This part works fine, however, as soon as i click to expand any given .accordion-group, .ui-droppable class gets stripped from ALL of them.

How do I stop it from removing .ui-droppable class??

Steps to reproduce:

  1. Use html markup from Bootstrap page:
    (For some reason I am unable to format HTML as code here by indenting it with 4 spaces,so im just pasting the link to it)
    http://twitter.github.com/bootstrap/javascript.html#collapse

  2. Add JS, which makes groups droppable

    $('#accordion2').find('.accordion-group').each(function() {
    $(this).droppable();
    });

  3. Inspect elements to make sure .ui-droppable class is set

  4. Click to expand a group. Any group.

  5. Inspect elements. .ui-droppable has been stipped from ALL of them

  • 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-12T03:08:14+00:00Added an answer on June 12, 2026 at 3:08 am

    Resolved this, but I think it is a very stupid way to achieve the result, so I am not happy with how Bootstrap handles toggles. I really don’t think there is a need to loop though every .accordion-group to re-apply droppable attributes every single time someone opens OR closes a section.

    Going to re-do it with just a button and a div for each section.

    Here is the solution:

    $('#host-groups').on('shown', function() {
        $('#host-groups').find('.accordion-group').each(function() {
            $(this).attr('id').droppable();
    
        });
    });
    
    $('#host-groups').on('hidden', function() {
        $('#host-groups').find('.accordion-group').each(function() {
            $(this).attr('id').droppable();
    
        });
    });
    

    /facepalm

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

Sidebar

Related Questions

I'm new to Bootstrap and am learning how to use it. I'm having some
I am new to Bootstrap and am having a few issues getting modal dialogs
I'm new using the excellent stuff of css twitter bootstrap and having a problem,
I'm new to Bootstrap and loving it so far but have a couple of
I have twitter bootstrap setup to build in a new project, but am getting
I'm trying to implement autoloading in Php5.3 using namespaces but I'm having some issues
I would like to use the new Bootstrap library from Twitter for an external
I have in my bootstrap public function initRoutes() { $router = new Zend_Controller_Router_Rewrite(); $route
I have downloaded the Kohana Pagination module from Git and have been having some
I'm having a few issues with trying to customize Twitter Bootstrap for my rails

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.