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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:43:00+00:00 2026-05-30T16:43:00+00:00

Check out this code : <a href=# id=link>Link</a> <span>Moving</span> $(‘#link’).click(function () { console.log(Enter); $(‘#link’).animate({

  • 0

Check out this code :

<a href="#" id="link">Link</a>
<span>Moving</span>

$('#link').click(function () {
    console.log("Enter");
    $('#link').animate({ width: 200 }, 2000, function() {
         console.log("finished");            
    });    
    console.log("Exit");    
});

As you can see in the console, the “animate” function is asynchronous, and it “fork”s the flow of the event handler block code. In fact :

$('#link').click(function () {
    console.log("Enter");
    asyncFunct();
    console.log("Exit");    
});

function asyncFunct() {
    console.log("finished");
}

follow the flow of the block code!

If I wish to create my function asyncFunct() { } with this behaviour, how can I do it with javascript/jquery? I think there is a strategy without the use of setTimeout()
​

  • 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-30T16:43:01+00:00Added an answer on May 30, 2026 at 4:43 pm

    You cannot make a truly custom asynchronous function. You’ll eventually have to leverage on a technology provided natively, such as:

    • setInterval
    • setTimeout
    • requestAnimationFrame
    • XMLHttpRequest
    • WebSocket
    • Worker
    • Some HTML5 APIs such as the File API, Web Database API
    • Technologies that support onload
    • … many others

    In fact, for the animation jQuery uses setInterval.

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

Sidebar

Related Questions

Check out this fiddler link With the working Code: KO Example Code The Idea
First check out this code. I seems like it should work for me, but
Please check this code out it compiles and runs absolutely fine.. The question is
Check out this code #include<stdio.h> int main() { const int a=7; int *p=&a; (*p)++;
I ran into a interesting issue today. Check out this pseudo-code: void Loop() {
I have this code: $('#checkout').click(function() { $.ajax({ type: 'GET', url: 'index.php?route=payment/quatro/confirm', success: function() {
Can someone please check out this code, i really dont understand why i got
Ok, check out this voodoo: This code: $xml = new SimpleXMLElement($xml); $var = $xml->QBXMLMsgsRs->ClassQueryRs;
Check out this code. // Print object and recurse if iterable private static void
Check out this code sample from Scott Guthrie's blog: http://weblogs.asp.net/blogs/scottgu/image_43366964.png Notice item is 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.