23 lines
827 B
JavaScript
23 lines
827 B
JavaScript
(function ($) {
|
|
"use strict";
|
|
/*----------------------------------------
|
|
passward show hide
|
|
----------------------------------------*/
|
|
$('.show-hide').show();
|
|
$('.show-hide span').addClass('show');
|
|
|
|
$('.show-hide span').click(function () {
|
|
if ($(this).hasClass('show')) {
|
|
$('input[name="login[password]"]').attr('type', 'text');
|
|
$(this).removeClass('show');
|
|
} else {
|
|
$('input[name="login[password]"]').attr('type', 'password');
|
|
$(this).addClass('show');
|
|
}
|
|
});
|
|
$('form button[type="submit"]').on('click', function () {
|
|
$('.show-hide span').text('Show').addClass('show');
|
|
$('.show-hide').parent().find('input[name="login[password]"]').attr('type', 'password');
|
|
});
|
|
|
|
})(jQuery); |