HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/video-rental/wp-content/themes/video-rental-olds/js/password-toggle.js
document.addEventListener("DOMContentLoaded", function () {
    document.querySelectorAll('.eye-icon').forEach(function(eyeIcon) {
        eyeIcon.addEventListener('click', function() {
            var input = this.closest('.form-grp').querySelector('input[type="password"], input[type="text"]');
            var icon = this.querySelector('img');

            if (input.type === 'password') {
                input.type = 'text';
                icon.src = passwordToggleVars.eyeClose;
                // icon.src = passwordToggleVars.eyeOpen;
            } else {
                input.type = 'password';
                // icon.src = passwordToggleVars.eyeClose;
                icon.src = passwordToggleVars.eyeOpen;
            }
        });
    });
});
document.addEventListener("DOMContentLoaded", function () {
    document.querySelectorAll('.eye-ico').forEach(function(eyeIcon) {
        eyeIcon.addEventListener('click', function() {
            var input = this.closest('.form-group').querySelector('input[type="password"], input[type="text"]');
            var icon = this.querySelector('img');

            if (input.type === 'password') {
                input.type = 'text';
                icon.src = passwordToggleVars.eyeClose;
                // icon.src = passwordToggleVars.eyeOpen;
            } else {
                input.type = 'password';
                // icon.src = passwordToggleVars.eyeClose;
                icon.src = passwordToggleVars.eyeOpen;
            }
        });
    });
});