jQuery模拟人打字插件typetype

所属分类:其他-动画效果

 51483  353  查看评论 (5)
分享到微信朋友圈
X
jQuery模拟人打字插件typetype ie兼容9

使用方法

jQuery和jquery.typetype.min.js(压缩后只有578个字节)加入你的页面。

<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript" src="jquery.typetype.js"></script>


然后您可以添加一些文本textareas,输入或其他HTML元素。

$('textarea').typetype('Some text that you want to demo')


自定义输入

$('textarea').typetype(
  'Text to append',
  {
    e: 0.04, // error rate. (use e=0 for perfect typing)
    t: 100, // interval between keypresses
    keypress: function (){
      // called after every keypress (this may be an erroneous keypress!)
    },
    callback: function (){
      // the `this` keyword is bound to the particular element.
    }
  }
)


backspace jQuery plugin

同样的道理,你可以通过这个可行的方法将文本文字后退

$('textarea').backspace(
  14, // number of chars to backspace
  {
    t: 100, // interval between keypresses
    keypress: function (){ },
    callback: function (){ }
  }
)


结合jQuery动画

这两个jQuery插件关联在一起可以使可读性更好,更连贯

$('textarea')
  .typetype('Hello, world!')
  .delay(1000)
  .typetype('\n\nGoodbye.')
  .backspace(25)
  .fadeOut() // regular jQuery effects queue up nicely
相关插件-动画效果

Google Doodle粘土动画

Google Doodle粘土动画
  动画效果
 33322  374

超级好看的花瓣表白网页源码

超级好看的花瓣表白网页源码
  动画效果
 65412  600

css3河流时间轴效果

不依赖任何框架,纯css3写成,简单,实用
  动画效果
 32887  333

canvas烟花效果

2018新年快乐烟花效果
  动画效果
 49567  585

讨论这个项目(5)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    ?? 0
    2017/11/8 17:06:29

    请问下怎么循环

    回复
    西瓜 0
    2014/9/16 8:35:28
    感谢华生君提出的问题和建议,收藏点击后收藏成功的,页面有缓存所以显示还是0.
        H0
        2016/4/21 16:04:16
        终于抓到你了
    回复
    华生君_ 0
    2014/9/16 7:20:10
    另外建议按ctrl+enter时,可以快捷评论,而不用每次都要移动鼠标来点 回复
    华生君_ 0
    2014/9/16 7:19:27
    收藏功能有bug,点了收藏后,显示已收藏,但是正面的数字还是0 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复