HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/smarthr-co-in/demo/codeigniter_bk/template/public/assets/js/otp.js
/*
Author       : Dreamstechnologies
Template Name: Smarthr - Bootstrap Admin Template
*/
(function () {
    "use strict";
	
	// Otp Verfication  
	$('.digit-group').find('input').each(function () { 
		$(this).attr('maxlength', 1); 
		$(this).on('keyup', function (e) { 
		var parent = $($(this).parent()); 
		if (e.keyCode === 8 || e.keyCode === 37) { 
		var prev = parent.find('input#' + $(this).data('previous')); 
		if (prev.length) { $(prev).select(); 
		} 
		} 
		else if ((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 65 && e.keyCode <= 90) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode === 39) {  
		var next = parent.find('input#' + $(this).data('next')); 
		if (next.length) { 
		$(next).select(); 
		} else { 
		if (parent.data('autosubmit')) { 
		parent.submit(); 
		}
		} 
		} 
		}); 
		}); 
		$('.digit-group input').on('keyup', function () { 
		var self = $(this); 
		if (self.val() != '') { 
		self.addClass('active'); 
		} else { 
		self.removeClass('active'); 
		} 
	});
		
})();