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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:33:18+00:00 2026-06-10T12:33:18+00:00

I have a quick question about jQuery’s AJAX function. The way I do my

  • 0

I have a quick question about jQuery’s AJAX function.

The way I do my ajax calls I do something along the lines of:

$.ajax({
    type: "GET",
    url: "/wordpress/wp-admin/admin-ajax.php",
    dataType: 'html',
    data: ({ action: 'loadHomePage'}),
    beforeSend: function() {
        document.getElementById('loading').style.visibility = 'visible';
    },
    complete: function(){
        FB.Canvas.setAutoGrow(false);
        FB.Canvas.setSize({height:600});
        setTimeout(function(){
            FB.Canvas.setAutoGrow(true);
        }, 100);
    },
    success: function(data){
        data = $.trim(data);
        $('#ajax-content').hide().empty().fadeIn('slow').html(data);
        FB.Canvas.scrollTo(0,0);                
    }
});

The trouble is, in this particular instance, it’s a full website inside a facebook iframe that uses ajax for the page navigation, when navigating between pages it seems to fade the content in multiple times so I was wondering what the best practise was here for the fade in part – should it go in the complete part?

I had the resizing stuff originally in complete but having moved it I think it’s made a difference but not sure if it’s a placebo effect….

If so, do I achieve it by doing the following:

complete: function(data){
    // fade in etc

and secondly, is it ok to do this if complete comes before success in the ordering of the source code or is the order important, e.g. success and then complete?

  • 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-10T12:33:19+00:00Added an answer on June 10, 2026 at 12:33 pm

    ‘complete’ fires and the end of the request cycle after both ‘success’ and ‘error’ (whichever was appropriate for your request) and its timing is independent of where you declare it in the source code.

    The complete function does not receive the ‘data’ parameter, so if your action depends on the data then it won’t work there.

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

Sidebar

Related Questions

I have a quick question about something I imagine must be pretty easy -
I just have a quick question about how to get the length of a
I have quick question about jQuery plugins, hope somebody out there has some advice.
Have a quick question about what would be the best way to implement iterators
I have a quick question about jQuery selectors. Is doing this: $('.class_el_1, .class_el_2').hide(); The
I have a quick question about this PHP function here. What is the am
I have a quick question about the jQuery.validate.js plugin from bassistance. I'm using version
I have a quick question about jquery .. I want to find < a
I have a quick question about keyup with jquery. I have several form input
Just quick question about typing. If I type into ghci :t [(a,3)] I get

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.