HEX
Server: LiteSpeed
System: Linux l24.yourwebhosting.net 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: turkishi (1582)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/learnpress/assets/src/js/utils/show-password.js
const $ = jQuery;

$( function() {
	$( '.form-field input[type="password"]' ).wrap( '<span class="lp-password-input"></span>' );
	$( '.lp-password-input' ).append( '<span class="lp-show-password-input"></span>' );

	$( '.lp-show-password-input' ).on( 'click', function() {
		$( this ).toggleClass( 'display-password' );
		if ( $( this ).hasClass( 'display-password' ) ) {
			$( this ).siblings( [ 'input[type="password"]' ] ).prop( 'type', 'text' );
		} else {
			$( this ).siblings( 'input[type="text"]' ).prop( 'type', 'password' );
		}
	} );
} );