Chroma Hash

Aug 8th, 2009

Matt Thompson criou uma forma divertida, com jQuery, de verificar se a senha digitada no campo de senha e no campo onde você confirma sua senha são iguais.

Veja: http://mattt.github.com/Chroma-Hash/

Isto é possível graças as seguintes linhas:

$(this).css({position:   'absolute',
left:       position.left + width - 2,
top:        position.top,
height:     height + "px",
width:      8 + "px",
margin:     5 + "px",
marginLeft: -8 * (i + 1) + "px"
}
);
});

var id     = $(this).attr('id');
var md5    = hex_md5($(this).val());
var colors = md5.match(/([\dABCDEF]{6})/ig);
$(".chroma-hash").stop();

chromaHashesForElement(this).each(function(i) {
$(this).animate({backgroundColor:"#" + colors[i]});
});

Fonte: Ajaxian.

No comments yet.
You must be logged in to post a comment.