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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:37:54+00:00 2026-06-17T22:37:54+00:00

I am using this code here to toggle a specific class of content within

  • 0

I am using this code here to toggle a specific class of content within a set of tabs. Here is a screenshot:

enter image description here

The Fade-in, fade-out effect works great, although I can see the new page “loading” after the fade-in effect of that new page has already started. And that’s set on slow transition! It seems as if the fading effect is not tied at all to the page load, which I think is throwing things off. Is there a way to make the transition more smooth?

Here’s the code:

jQuery(document).on("click",".nav-tab", function(e){ 
    e.preventDefault();
jQuery('.page-form').fadeOut('slow').load(jQuery(this).attr('href') + ' .page-form');
jQuery('.page-form').fadeIn('slow').load(jQuery(this).attr('href') + ' .page-form');
});
  • 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-17T22:37:56+00:00Added an answer on June 17, 2026 at 10:37 pm

    Your second call:

    jQuery('.page-form').fadeIn('slow').load(jQuery(this).attr('href') + ' .page-form');
    

    Has to happen in a finish-callback to the first call, like this:

    jQuery('.page-form').fadeOut('slow')
        .load(jQuery(this).attr('href') + ' .page-form', function() {
            jQuery('.page-form').fadeIn('slow')
                .load(jQuery(this).attr('href') + ' .page-form');
            });
    

    The reason is that most jQuery functions work asynchronously: You probably assumed the call would block until the content is loaded, but that’s not the case – the call returns immediately, and the content gets loaded in the background. This causes the strange effects you’re seeing – the div is faded in and out and loaded twice, all at the same time.

    Edit: Btw, why exactly are you doing a second load() after the first one? This looks a bit strange to me – I assume you want to have the element fade out, then load new content, then fade in again?

    Also note that fadeOut() accepts a callback similar to load() – so if you want to have the fade finish before the loading starts, place the first load() inside a callback and pass that to the fadeOut()-call.

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

Sidebar

Related Questions

IN my application i am using this code to Call my First Class Xib.Here
I am using this code taken from here : import smtplib def prompt(prompt): return
Im using Doctrine and i dont quite understand this code here: $this->hasColumn('id', 'integer', 8,
There are a lot of posts on here about this, I'm using this code
Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
I'm using this plugin and here is the code: http://jsfiddle.net/gm8t5/ Basically I want to
Ok, here's what I'm trying to do... given this razor code @using(Html.WriteLater()) { output
Alright...I am here looking for some bread crumbs. This is my code: using System;
So I'm trying to access this api https://www.clarityaccounting.com/api-docs/ using SUDS. Here is the code
This function updates my content using the .load method from JQuery. The code works

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.