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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:47:48+00:00 2026-05-25T13:47:48+00:00

Please see Matt’s answer to this question . He says that .delay() is confusing

  • 0

Please see Matt’s answer to this question. He says that .delay() is confusing to most people, and he gives the following example:

$('#foo').hide().delay(2000).slideDown().text('Hello!').delay(2000).hide();

See here for the fiddle. Could somebody explain the behaviour of that line of code?

  • 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-25T13:47:48+00:00Added an answer on May 25, 2026 at 1:47 pm

    Only certain parts of jQuery’s code can be pushed off with .delay() — hide() and text() are not a part of that group.

    So basically what the code is doing is (not really doing this, this is just a sketch):

    setTimeout(function(){
        $('#foo').slideDown();
    }, 2000);
    $('#foo').hide().text('Hello!').hide();
    

    So that is why the slideDown() seems to happen last.

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

Sidebar

Related Questions

Please see my answer to this question below. It is based upon Kevin's input,
Please see the following stacktrace, is this a permissions issue? C:\Project\MySQL-python-1.2.3>python setup.py Traceback (most
Important : Please see this very much related question: Return multiple values in C++
Please see the following code: def good(): foo[0] = 9 # why this foo
Please see the following script: var x = function(param){ this.data=param; this.y = function(){ alert(this.data)
Please see this comment and the rest of the thread: [question]: TinyMCE Image URL
Please see here for a question I recently asked. The only answer you should
Please see the following code to understand my question better. class compareByValue { public:
Please see the solution to another question provided by ud3323: http://jsfiddle.net/ud3323/ykL69/ . This solution
Please see here for a related question . However, char goes to 0xffff (or

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.