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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:05:13+00:00 2026-06-02T16:05:13+00:00

In jquery I have a button with a fading effect: function blinky() { $(‘#ButtonContent_btnSubmit’).delay(100).fadeTo(100,

  • 0

In jquery I have a button with a fading effect:

function blinky() {
    $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blinky);    
}

This causes a nice blinking effect, but I only want the blinking effect to last for say 10 seconds.

I want it to only blink for say 10 seconds…Could I apply setTimeout() to this? I tried to apply setTimeout like so:

function blinky() {
    setTimeout($('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blinky), 100);  
}

But this does not seem to work.

Edit

Im a jquery noob so Im trying to get this to work…
Lets say here is my document ready:

$(document).ready(function () {
 if ($('#StatusContent_ddlStatus').val() == "Not Submitted" && $("#LineItemContent_gvLineItems tr").length > 0) {
              blink();
        }
});

var count = 0;

function blink() {
    if (++count < 10)
        $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blink);
}​

In developer tools (chrome) it throws some sort of exception…

Edit 2

If I put it all in document ready:

 $(document).ready(function () {
     if ($('#StatusContent_ddlStatus').val() == "Not Submitted" && $("#LineItemContent_gvLineItems tr").length > 0) {
                  blink();
            }

 var count = 0;

    function blink() {
        if (++count < 10)
            $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blink);
    }​

    });

Then in developer tools it says Uncaught syntax error: Unexpected token illegal.

Edit 3

I tried to place it at the top before calling it:

$(document).ready(function () {
        var count = 0; 
        var f = 0;

         function blink() { 
            if (++count < 10) 
                $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1,        blink); 
            }

          if ($('#StatusContent_ddlStatus').val() == "Not Submitted" && $("#LineItemContent_gvLineItems tr").length > 0) {
            blink();
        }
});

Same issue…

  • 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-02T16:05:15+00:00Added an answer on June 2, 2026 at 4:05 pm

    It can be a lot simpler, just save the number of calls to the blink function:

    var count = 0;
    
    function blinky() {
        if (++count < 10)
            $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blinky);
    }​
    

    Or with time limitation:

    var startDate = new Date().getTime();
    function blinky() {
        if (new Date().getTime() - startDate < 10000)
            $('#ButtonContent_btnSubmit').delay(100).fadeTo(100, 0.5).delay(100).fadeTo(100, 1, blinky);
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following home-grown jquery plugin: (function($) { $.fn.defaultButton = function(button) { var
I have a Jquery Mobile page. In my header I have a button to
I have a button that does not work in jquery. A button is passed
I'm trying to use $(button).button(); but jquery-ui-1.8.16.custom.min.js used by SlickGrid doesn't have the button
I have a problem selecting a checked radio button with jquery. The radio buttons
On my website www.staygold-design.com I have a fancybox jquery script on a button under
I need to retrieve a value for a clickable button using jquery. I have
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
In my view I have this button: <input type=submit value=Delete disabled=disabled id=btnDelete name=btnDelete />
I have button and that jQuery script (to start the progress bar): <script src=../_Files/JScripts/jquery-1.3.2.js

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.