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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:17:33+00:00 2026-06-13T15:17:33+00:00

I do got a nice accordion like the example over at JQuery UI and

  • 0

I do got a nice accordion like the example over at JQuery UI and it works but when i refresh the div with an ajax call the accordion doesnt work anymore, its just plain html… How can i do this i searched the internet and i only get “How to load ajax into accordion” or I read that it isn’t possible with .live() which i already found out.

I tried loading in after the ajax was finished, which looks like this:
$(“form.ajax”).submit(function(){

    var url = $(this).attr('action');
    var element = '';
    if($(this).attr("element") != null)
    {
        element = $(this).attr("element");
    }
    else if($(this).attr("element") == null)
    {
        element = "render";
    }
    $("#"+element).html("<div id='loader'>Laden...<br /><img src=\"/site/templates/img/ajax-loader.gif\"/></div>");
    $.post(url, $(this).serialize(), function(data){
        $('#accordion').accordion();
        $("#"+element).html(data);

    });
    return false;
}); 

I don’t think im the only one with this problem

Please help me out

  • 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-13T15:17:34+00:00Added an answer on June 13, 2026 at 3:17 pm

    You have to fill the div first, an then set the accordion. Like this:

    $("#"+element).html(data);
    $('#accordion').accordion();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've got a nice floated form layout that works beautifully in FF and
I've got this nice USB barcode scanner and I'd like to readthe input using
Dotcms does have a nice template system based on velocity, but it seems like
I've got a nice text based java program that I'd like to add a
I've got a nice MVC app running now, and I'm adding some AJax functionality.
Hey, I've got this nice little piece of code, much like all the other
I got this nice code, which I have no idea why doesn't work. It
I've got a nice database I've created in Django, and I'd like to interface
I asked similar question before and got some nice code, but i'm concerned with
So I've got this nice little MVVM solution, and things work great. I've got

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.