mootools_使用MooTools PassShark的iPhone样式密码

mootools

iPhone

Every once in a while I come across a plugin that blows me out of the water and the most recent culprit is PassShark: a MooTools plugin that duplicates the iPhone's method of showing/hiding the last character in a password field. This gem of a MooTools plugin, which conquers some problems that plague jQuery counterparts, was authored by valued MooTools contributors Luis Merino and Nathan Querido.

每隔一段时间,我会遇到一个让我大跌眼镜的插件,而最近的罪魁祸首是PassShark:一个MooTools插件,它复制了iPhone在密码字段中显示/隐藏最后一个字符的方法。 MooTools插件的瑰宝,解决了困扰jQuery同行的一些问题,由著名MooTools贡献者Luis Merino和Nathan Querido编写。

MooTools PassShark的用法 (The MooTools PassShark Usage)


window.addEvent('load',function() {
	new PassShark('pass',{
		interval: 300,
        	duration: 1500,
        	replacement: '%u25CF',
        	debug: false
    });
});


The only required parameter is the ID of the input/password element you'd like to act as an iPhone password field. Options include:

唯一需要的参数是您要用作iPhone密码字段的input / password元素的ID。 选项包括:

  • interval: Amount of time between new character checks.

    interval:新字符检查之间的时间间隔。
  • duration: Amount of time to show a given character before obfuscating it.

    持续时间:在混淆给定字符之前显示给定字符的时间。
  • replacement: The character to replace the character.

    替换:替换字符的字符。

Sometimes the less options the better!

有时候选择越少越好!

PassShark is yet another perfect showcase of what MooTools allows you to accomplish. Big ups to Luis Merino and Nathan Querido for releasing this gem. To get more specific information about their great plugin, visit their blog post. MooTools FTW!

PassShark是MooTools可以帮助您完成的又一个完美展示。 路易斯·梅里诺(Luis Merino)和内森·奎里多(Nathan Querido)的大人物发布了这款宝石。 要获取有关其出色插件的更多具体信息, 请访问其博客文章 。 MooTools FTW!

翻译自: https://davidwalsh.name/iphone-password

mootools

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值