MIS@N Blink
A script that changes the color of a letter or letters in text in a random way.
Instalation
npm i misan.blink
or use GitHub source
Usage
<h1 class="blink-text">Your text to blink</h1>
<h1 id="blink-text">Your other text to blink</h1>
new Blink({
class: 'blink-text',
baseColor: '#00f',
blinkColor: '#f00',
interval: 5000
});
or
new Blink({
id: 'blink-text',
baseColor: '#00f',
blinkColor: '#f00',
interval: 5000
});
or
new Blink({
tag: 'h1',
baseColor: '#00f',
blinkColor: '#f00',
interval: 5000
});
Properties
-
tag
- element tag name for blinking - defaultnull
-
id
- element id for blinking - defaultnull
, used iftag
is null -
class
- element class for blinking - defaultnull
, used iftag
andid
are null -
baseColor
- base of the text color - defaultnull
, overwrite base color -
blinkColor
- blinking of the text color - defaultnull
-
interval
- the time between the change of the text color inms
- default1000
-
type
- can be use to change blinked letters to single words - defaultletters
, can takewords
,letters
Change log
- 23/09/2020 - remove jquery from dependencies
- 24/05/2019
- add html tags to select
- add property
type
to change blinked letters to blinked words
- 29/04/2019 - removed
space
from random chars - 27/04/2019 version 0.1.0