0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-12-25 01:53:48 +01:00

Focus password field after changing type

This commit is contained in:
peteruithoven 2014-05-12 18:20:15 +02:00
parent 9b06139f85
commit 3d6cd67616

View File

@ -6,7 +6,10 @@
var $input = $(this);
var $checkbox = $($input.data('typetoggle'));
$checkbox.change(updateType);
$checkbox.change(function() {
updateType();
$input.focus();
});
updateType();
function updateType() {
$input[0].type = $checkbox.is(':checked') ? 'text' : 'password';