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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:31:35+00:00 2026-06-16T00:31:35+00:00

I am loading html using ajax call, this html has Bootstrap Collapse . The

  • 0

I am loading html using ajax call, this html has Bootstrap Collapse. The issue is Collapse is not working, if you click it will expand but it won’t collapse again.

To check if I am doing something wrong, I put the same code on a static page (not loaded using ajax) and it works fine. So its seems issue only with dynamically loaded html.

I tried manually enabling Collapse using

$(".collapse").collapse() 

but still same issue.

I guess I need to use jquery’s live() / on() methods, because the html is dynamic, but not sure how do I do that for calling $(".collapse").collapse() because I think it only works on events or is it something else that I need to do ?

  • 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-16T00:31:35+00:00Added an answer on June 16, 2026 at 12:31 am

    i would suggest you to call

     $(".collapse").collapse() 
    

    inside the ajax’s success function after the dynamic html is appended.

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

Sidebar

Related Questions

I'm loading html content via ajax onto a div (using mootools 1.11 and squeezebox,
i'm loading, using the JQuery ajax() method, an external page with both html and
I'm loading some some html into a div through ajax using jquery. Once the
Using jQuery 1.7.1, I am loading some HTML fragments via AJAX that are injected
I am using jquery's ajax loading function to load an external html. The external
I have this tinymce text area which is using Ajax to call it and
I am loading HTML into DOM and then querying it using XPath in PHP.
I'm using jQuery version 1.7.1 from Google CDN and have the following code: $(menuInstance).delay(2000).removeClass('loading').html(ul);
$('a').click(function(event){ $('body').html('loading...'); $.post('www.sitename.com/hello',{site:http//:www.google.com},function(data) { alert(data); }); event.preventDefault(); }); I am using the above script
I'm loading form into jquery-ui dialog using jquery.html() function and then Submitting doesn't work

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.