Authored by htoooth

tips调整,找回密码密码输入

... ... @@ -46,10 +46,23 @@
<li class="input-container-li po-re">
<input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="新的登录密码"
maxlength="20">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
</li>
<li class="clearfix">
<input id="re-input" class="input va re-input repwd" type="password" name="re-input"
placeholder="确认登录密码" maxlength="20">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
</li>
<li class="clearfix blank">
<input type="hidden" name="code" value="{{code}}">
... ...
... ... @@ -16,23 +16,16 @@ var ep = new EventProxy();
var pwdRegx = require('../common/mail-phone-regx').pwdValidateRegx;
var $errTip = $('.tips'),
$errMsg = $errTip.find('.rectangle');
function errTip(ele, msg) {
var topLeft = ele.offset();
var $errTip = ele.next('.tips');
var $errMsg = $errTip.find('.rectangle');
$errMsg.text(msg);
return $errTip.css({
top: topLeft.top + ele.height() - 2,
left: topLeft.left,
width: ele.width() + 2,
height: ele.height
}).removeClass('hide');
return $errTip.removeClass('hide');
}
function hideTip() {
return $errTip.addClass('hide');
function hideTip(ele) {
return ele.next('.tips').addClass('hide');
}
require('yoho-jquery-placeholder');
... ... @@ -93,12 +86,12 @@ $repasswordInput.on('keyup blur', function() {
ep.on('repwd', function(repwdAuth) {
if (repwdAuth) {
hideTip();
hideTip($repasswordInput);
}
});
ep.on('pwd', function(pwdAuth) {
if (pwdAuth) {
hideTip();
hideTip($passwordInput);
}
});
... ...