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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:34:35+00:00 2026-06-09T12:34:35+00:00

You will see that on clicking divA , divAA will slide down. on clicking

  • 0

You will see that on clicking divA , divAA will slide down. on clicking divB, divBB will slide down.

After clearing the main DIV and appending the same contents again, the accordion stops working as shown in this demo: http://jsfiddle.net/p7vUk/2/

Can somebody please explain why it stops working and how to fix it?

  • 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-09T12:34:36+00:00Added an answer on June 9, 2026 at 12:34 pm

    Your problem is the fact removing the original DOM objects that the accordion functionality attached itself to. Just because you add new ones doesn’t mean its the same thing. They are entirely new elements, and because of that you have to run the accordion functionality on them again.. Thats about as dumbed down as I can make it sound.

    So try this..

    function clearAndAdd() {
    
                $("#content").empty();
                $("#content").append('<div id="a">DIV ID A</div><div id="aa">DIV ID AA</div><div id="b">DIV ID B</div><div id="bb">DIV ID BB</div>');
                $("#content").accordion();
            } 
    

    if that last new line doesn’t work try this instead

    $("#content").accordion('destroy').accordion();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After running the following SQL statements, you will see that, MySQL has automatically created
If you look at my document here: http://featuredfotografer.com/ you will see that there is
If you visit this site , you will see that there is an image
&mobile=0400000000¬es=this+is+a+test The error is above You will see that the following has occurred ¬es
Folks. I trust that the community will see this as a relevant question. My
Example: http://bit.ly/dfjvmT If you take a look at that URL, you will see an
I am working on a function that will essentially see which of two ints
Looking through the documentation for CFDataRef I can't see anything that will compress a
I know there are tools out there that will let you see the content
what is the $_SERVER variable that will allow me to see the friendly URL

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.