Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blink image with JQuery

Tags:

jquery

Is it possible to blink a image with JQuery?

I need to blink certain image with specific class. It should work in both IE and firefox

like image 816
jvm Avatar asked May 18 '26 22:05

jvm


2 Answers

Something like this:

function blink(time, interval){
    var timer = window.setInterval(function(){
        $("img").css("opacity", "0.1");
        window.setTimeout(function(){
            $("img").css("opacity", "1");
        }, 100);
    }, interval);
    window.setTimeout(function(){clearInterval(timer);}, time);
}

And start function with blink(900000, 1000);

like image 127
jerone Avatar answered May 22 '26 05:05

jerone


$(function() {window.setInterval("$('.myImage').toggle();",2000);});
like image 27
Yuriy Faktorovich Avatar answered May 22 '26 05:05

Yuriy Faktorovich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!