Text blinking jQuery

后端 未结 30 1869
我寻月下人不归
我寻月下人不归 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:52

    Blink functionality can be implemented by plain javascript, no requirement for jquery plugin or even jquery.

    This will work in all the browsers, as it is using the basic functionality

    Here is the code

    HTML:

    This will blink

    JS Code:

    var ele = document.getElementById('blinkThis');
    setInterval(function () {
        ele.style.display = (ele.style.display == 'block' ? 'none' : 'block');
    }, 500);
    

    and a working fiddle

提交回复
热议问题