parent
d42df141a9
commit
ce17b637a2
10 changed files with 213 additions and 8 deletions
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,15 @@ |
||||
import $ from 'jquery'; |
||||
|
||||
$(document).ready(function () { |
||||
$('button.password-toggle').on('click', function () { |
||||
const wrapElement = $(this).closest('.field__wrap'); |
||||
const inputElement = wrapElement.find('input'); |
||||
if (inputElement.attr('type') === 'password') { |
||||
inputElement.attr('type', 'text'); |
||||
wrapElement.addClass('password-visible'); |
||||
} else { |
||||
inputElement.attr('type', 'password'); |
||||
wrapElement.removeClass('password-visible'); |
||||
} |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue