Text blinking jQuery

后端 未结 30 1894
我寻月下人不归
我寻月下人不归 2020-11-27 03:23

What is an easy way to make text blinking in jQuery and a way to stop it? Must work for IE, FF and Chrome. Thanks

30条回答
  •  死守一世寂寞
    2020-11-27 03:46

    Seeing the number of views on this question, and the lack of answers that cover both blinking and stopping it, here goes: try jQuery.blinker out (demo).

    HTML:

    Hello there!

    JavaScript:

    var p = $("p");
    
    p.blinker();
    
    p.bind({
        // pause blinking on mouseenter
        mouseenter: function(){
            $(this).data("blinker").pause();
        },
        // resume blinking on mouseleave
        mouseleave: function(){
            $(this).data("blinker").blinkagain();
        }
    });
    

提交回复
热议问题