typist-jquery

Add animated text typing to any element.

  • 所有者: davidcrawford/typist-jquery
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

typist-jquery

Typist is a jQuery plugin that allows you to animate text as if it were being typed onto the screen.

$('#terminal').typist({
  height: 300
});

$('#terminal').typist('prompt')
  .wait(1500)
  .typist('type', 'greet')
  .typist('echo', 'Hello, world!')

See it in action at http://chartulo.us

This software is licensed under the MIT license. See the details in the file called LICENSE.

Options

Pass in options when initializing your 'terminal' by passing in an object with the following properties.

  • height
    Typist sets your div to be fixed height with overflow: hidden, so that text scrolls off the top like a terminal window. Use height to set the desired height (just passes through to CSS). Integer number of pixels.

  • width
    Sets a fixed width for your terminal element. Integer number of pixels.

  • backgroundColor
    Set the color of the terminal element. Any string that's a valid color in CSS.

  • textColor
    Set the text color. Any string that's a valid color in CSS.

  • fontFamily
    Set the font family for the text in the terminal.

API

typist(config)

Initializes the terminal element.

typist('prompt')

Adds a prompt line and starts a cursor blinking.

typist('type', text)

Types text on a prompt line.

typist('echo', text)

Prints out text as if it were the output of a command. Creates a new line.

typist('wait', millis)

Pauses animation for the specified number of milliseconds. If on a prompt line, cursor continues to blink.

typist('speed', fast_or_slow)

Sets the speed of typing/echoing for commands that come afterwards

主要指標

概覽
名稱與所有者davidcrawford/typist-jquery
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2012-08-01 01:59:00
推送於2012-08-08 00:39:37
最后一次提交2012-08-07 20:39:28
發布數0
用户参与
星數222
關注者數24
派生數25
提交數6
已啟用問題?
問題數3
打開的問題數2
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?