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

  • Home
  • SEARCH
  • 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 8569361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:19:01+00:00 2026-06-11T18:19:01+00:00

Would someone mind giving me a hand and help me out by taking a

  • 0

Would someone mind giving me a hand and help me out by taking a look at this function and explaining how i could add and execute a callback function after last element is finished fading in. I’m not sure how i’m suppose to fit it in or rework the code to get the result i’m looking for.

code is here Fiddle

Thank you

  • 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-11T18:19:02+00:00Added an answer on June 11, 2026 at 6:19 pm

    Using a callback is nothing more than passing a function as an argument, and calling that function at a certain time. As a side note, I suspect you want all .item elements, but .next doesn’t care about the original selector. http://jsfiddle.net/4Pvmq/6/

    $(function(){
        elFadeIn('.item', function() {
            alert("done");
        });
    });
    
    function elFadeIn(selector, callback) {
        var $items = $(selector);
    
        // this is the function that's going to be called recursively
        (function fade(i) {
            var $elem = $items.eq(i);
    
            if($elem.length) {  // there is an element
                $elem.fadeIn('slow', function() {  // fade it
                    fade(i + 1);
                });
            } else {  // no elements left
                callback();
            }
        })(0);  // start with first
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would be so very grateful if someone could help me out! I have
I fear this is obvious, but would someone mind confirming that the private fields
I was hoping someone could help me sort something out. I've been working on
Would someone mind converting this line of ternary code to if / then statements.
would someone please write this code: this.Loaded += (s, e) => this.loaded = true;
Would someone be able to help here? I would like to fill a div
would someone be able to help me with a button to clear /delete the
I'm rubbish at regular expressions, so would someone be able to help me find:
Would someone mind checking my site in Firebug? It looks like the jquery hide/show
Possible Duplicate: When is a do-while appropriate? Would someone mind telling me what 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.