【Javascript】タイプライター効果のためのJavascriptライブラリTypeWriting.js

Javascript

TypeWriting

June 11, 2016

TypeWriting.jsはタイプライター効果のためのJavascriptライブラリ。

Setup

<!-- jQuery -->
<script type="text/javascript" src="jquery.min.js"></script>
<!-- just typewriting.js or .min.js -->
<script type="text/javascript" src="path/to/typewriting.min.js"></script>

TypeWriting()

var typeWriting = new TypeWriting({
    targetElement   : document.getElementsByClassName('terminal')[0],
    inputString     : 'Hello, world.',
    typing_interval : 130,
    blink_interval  : '1s',
    cursor_color    : '#00fd55',
}, function() {
    console.log("END");
});

rewrite()

typeWriting.rewrite( "Welcome to TypeWriting.js", function() {
    console.log("Rewrite() is finished");
});

MITライセンス

Latest Posts

Related Posts