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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:42:24+00:00 2026-05-20T15:42:24+00:00

Is it possible to make an image blink using jquery – i.e fade to

  • 0

Is it possible to make an image blink using jquery – i.e fade to a lighter colour and back within a few seconds and loop? Just wondering if theres an alternative to using Flash for this?

Cheers
Paul

  • 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-20T15:42:25+00:00Added an answer on May 20, 2026 at 3:42 pm

    I’d suggest binding a custom “fadeToggle” event to your image and swapping between effects based on a value you save to the jQuery data store for the image, then triggering the event recursively in the completion callback of each animation. This has the benefit of simply unbinding the event if you want to stop the animation.

    For instance:

    // Bind a custom event to your image object
    $("img").bind("fadeToggle", function() {
    
        // Negate the current value of the fadeIn object in this element's data store
        // Initial fire will set value to !null (which == true)
        $(this).data("fadeIn", !$(this).data("fadeIn"));
    
        // Create a callback function to recursively trigger the event at the end of either animation
        var callback = function() {
            $(this).trigger("fadeToggle");
        };
    
        // Test the value in the data store
        if ($(this).data("fadeIn")) {
    
            // Fade in and trigger the next fadeToggle event
            $(this).fadeIn("slow", callback);
        } else {
    
            // Fade out and trigger the next fadeToggle event
            $(this).fadeOut("slow", callback);
        }
    }).trigger("fadeToggle"); // Trigger first event to start the chain
    

    See a working fiddle here.


    EDIT:

    After happening across some jQuery 1.4.4 changelogs, I noticed the .fadeToggle() function, which makes this even easier. The sample code is below. It basically consists of the exact same model of triggering a fadeToggle event repeatedly in the callback of the new fadeToggle animation.

    $("img").bind("fadeToggle", function() {
        $(this).fadeToggle("slow", function() {
            $(this).trigger("fadeToggle");
        });
    }).trigger("fadeToggle");
    

    The fiddle has been updated with the new code.

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

Sidebar

Related Questions

Is it possible to make a copy of Gdk.image object using lablgtk2 for Ocaml?
Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0?
Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should
Is it possible to make IE start displaying Progressive JPEG before the image has
I was wondering if it was possible to make a small script in Jquery
I'm trying to make the background image as professional as possible so I'm thinking
Possible Duplicate: How to make an image center (vertically & horizontally) inside a bigger
is it possible to make CSS Layers shaped like the following image... i know
Possible Duplicates: Want to render an image without saving it to disk using PHP
How is it possible to make prototype methods in C#.Net? In JavaScript, I can

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.