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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:14:36+00:00 2026-05-20T03:14:36+00:00

I have a function that calls jQuery’s pulse function. I use it on a

  • 0

I have a function that calls jQuery’s pulse function. I use it on a small graphic in the client interface that indicates that some data is in the process of being synchronized with the server. While the data is being transferred, the pulse function takes effect, making the graphic look like a flickering light.

Alongside that little indicator graphic, is some text. So, when the synchronization is complete, the pulse is stopped, the graphic turns green, and the text says “data synced”.

All well and good, except that for reasons I don’t understand, the function to stop the pulse effect works only about 50% of the time. However, the text that gets changed to say “data synced” works 100% of the time.

How is it that I can get to the point in the code where both actions are executed, and yet only one actually happens? It seems to me they should either both work or both fail. (I have tried changing their order, but that does not have any effect on the problem.)

Here is the code in question. The first function executes when data begins synchronizing, the other executes when the server sends back a JSON saying “all good: data synchronized”.

Also note, I’m kind of a noob, so please dumb down answers to my level.

function syncDataStart()
{
    $(document.getElementById("indicator")).pulse(
    {
        backgroundColor: ["yellow", "orange"]
    }, 100, 9999, "linear");
    document.getElementById("indicator-text").innerHTML = "synchronizing data";
}

function syncDataComplete()
{
    document.getElementById("indicator-text").innerHTML = "data synced";
    $(document.getElementById("indicator")).stop();
    document.getElementById("indicator").style.backgroundColor = "green";
}
  • 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-20T03:14:37+00:00Added an answer on May 20, 2026 at 3:14 am

    Okay, solved it for sure this time.

    Turns out the problem was not in the stop() method, but with how the pulse is started. I’ll try and explain this so it makes sense, and hopefully is helpful for others with similar issues.

    My mistake was assuming that when one started a pulse animation on a named element (in my case the #indicator div), then that pulse effect was simply “on”, and could be simply switched off. I assumed it was binary, kind of like how a button element can be either enabled or disabled, and trying to disable it a second time wouldn’t do anything.

    However, the reality is that the pulse effect is cumulative. In other words, if you call the pulse effect on the same element, it will add another pulse on top of the existing one.

    In my interface, I have a few different widgets that can turn on the indicator pulse effect. What I did not realize was happening was that under certain circumstances they were each adding a new pulse effect on top of any running ones.

    So when the stop() method was called, it probably was stopping one of running pulse effects, but others kept running, making it look as though the pulse effect was simply continuing. (It might be helpful if there was code to say “stop ALL running animations…)

    I simply added a variable storing a value that would say whether or not there was already a pulse effect going. If there was, then don’t start a new one. That way, I ensure there is only one pulse effect going at any one time, and the stop() method can kill it.

    Thank you to everyone for their helpful explanations, and for taking the time to write example code that enlighted me on what I should be expecting.

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

Sidebar

Related Questions

I have a jQuery function that updates my data ever few seconds. But! It's
I have a JQuery's .each loop that calls a function with a parameter per
I have a Flex application that calls a function which searches a large document
I have a function that I use called sqlf(), it emulates prepared statements. For
I have a jQuery function that is causing display errors in IE7. I simply
I have a login link that fires a javascript function that calls a logout
I have manage to create a small size js application that uses jQuery and
I have a script that calls a php page via jquery/ajax. The results would
I have a simple function that I want to call in the code behind
So i have a piece of assembly that needs to call a function with

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.