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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:23:16+00:00 2026-05-26T06:23:16+00:00

I have horizontal menu. It looks like that <ul> <li>Sample 1</li> <li>Sample 2</li> </ul>

  • 0

I have horizontal menu. It looks like that

<ul>
<li>Sample 1</li>
<li>Sample 2</li>
</ul>

Is there any way to fadein them one by one on page load?

  • 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-26T06:23:16+00:00Added an answer on May 26, 2026 at 6:23 am
    function fadeIn(i, elements, duration, callback){
        if(i >= elements.length)
            $.isFunction(callback) && callback();
        else
            elements.eq(i).fadeIn(duration, function(){
               fadeIn(i+1, elements, duration, callback);
            });        
    }
    
    fadeIn(0, $('ul li'), 100, function(){console.log("animation finished!");});
    

    working demo :

    http://jsfiddle.net/gion_13/7KQbB/

    And of course you can pluginify the code for a more jquery-like synthax:

    $.fn.fadeInEach = function(duration,callback){
        function fadeIn(i,elements,duration,callback){
            if(i >= elements.length)
                typeof callback == 'function' && callback();
            else
                elements.eq(i).fadeIn(duration, function(){
                   fadeIn(i+1, elements, duration, callback);
                });        
        }
        fadeIn(0, this, duration, callback);
        return this;
    } 
    

    Now you can use this plugin exactly as the native fadeIn method :

    $('li').fadeInEach(100,function(){alert('animation has finished');});
    // if you want to animate all of the elements in the same time use fadeIn : 
    // $('li').fadeIn(100,function(){alert('animation has finished');});
    

    The great thing about this approach is that it works on any elements (not only li’s).
    Here’s the demo for this little plugin :

    http://jsfiddle.net/gion_13/7KQbB/1/

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

Sidebar

Related Questions

I have a ul list that I display as a horizontal menu. I'd like
I have this horizontal menu. The menu looks like tabs and are 29px high.
I have a horizontal menu. The markup looks like this: <ul class=menu> <li>Item 1</li>
I have a header for the page with horizontal menu navigation like A B
I have been trying to make the sub-menu horizontal. In my HTML it looks
i have a that contains a HORIZONTAL menu. the menu consists of an unordered
Do you know any controls inherited from the ItemsControl that have horizontal orientation of
I have a Listview that originally listed items from a menu item with one
is there a way to avoid problems with jQuery's slideToggle()? I have a horizontal-sliding
I have a horizontal menu that contains buttons. Clicking on the button opens a

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.