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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:17:44+00:00 2026-05-24T09:17:44+00:00

I am trying to use a jQuery plugin to implement Expand all Divs/ Collapse

  • 0

I am trying to use a jQuery plugin to implement Expand all Divs/ Collapse All Divs/ expand or collapse individual Divs, Here is the Jquery plugin : http://www.adipalaz.com/experiments/jquery/multiple_expand_all_collapse_all.html. The only diferrence is i am trying to apply these effects to the Divs retrieved from AJAX post.

Below is my current flow:

Post data to a url(getData.php) fromindex.php and retrieve Html DIVs-> perform toggles on the Divs. CSS required for te DIVs are loaded on Index.PHP already.

A toggle button is attached using jquery and CSS to the retrieved DIV, on the index Page. The java script required to toggle the div is already present on the index.php Page. But the toggle buttons doesn’t appear on the retrieved div because they are fired even before the content is retrieved. I tried using ajaxStop, to trigger ajax completion and then fireing the toggle functions but no use.below is my sample code.

     $.ajax({
                                type: 'POST',
                                url: 'getTicketSummary.php', 
                                data: {ref_no: ref_no},
                                success: function(data) {
                                    $('#wrapper').hide().html(data).slideDown('slow');
                                    $(function() {
     $("#content h3.expand").toggler();
        $("#content div.demo").expandAll({trigger: "h3.expand", ref: "h3.expand"});
    });
                            }
                        });
                    }
                });

$(function() {
     $("#content h3.expand").toggler();
        $("#content div.demo").expandAll({trigger: "h3.expand", ref: "h3.expand"});
    });

//this is my toggle function, as am using a jquery plugin, expand.js, now I tried adding the function after Post request but it doest seem to work.

  • 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-24T09:17:45+00:00Added an answer on May 24, 2026 at 9:17 am

    following code is enough for this

     $.ajax({
           type: 'POST',
           url: 'getTicketSummary.php', 
           data: {ref_no: ref_no},
           success: function(data) {
                    $('#wrapper').hide().html(data).slideDown('slow',function(){
                      $("#content h3.expand").toggler();
                      $("#content div.demo").expandAll({trigger: "h3.expand", ref: "h3.expand"});
                    });
           }
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a
I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete ). My
I'm trying to use the jQuery validation plugin (from here --> http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ) to
I'm trying to use the jQuery Cycle plugin (http://jquery.malsup.com/cycle/) to rotate testimonials located within
I am using this jQuery form validation plugin: http://docs.jquery.com/Plugins/Validation/Methods I am trying to use
I am trying to use the awesome jquery masonry plugin -> http://desandro.com/resources/jquery-masonry/ The plugin
I've been trying to implement the ThreeDots plugin ( http://tpgblog.com/2009/12/21/threedots-the-jquery-ellipsis-plugin/ ) on the project
In an ASP.NET MVC project I'm trying to use jQuery spinner plugin . All's
I am trying to use the jquery globalization plugin (https://github.com/jquery/globalize) to work with asp.net
I have a page that uses the JQuery Listnav plugin ( http://www.ihwy.com/labs/jquery-listnav-plugin.aspx ). The

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.