two-step-verification.init.js 904 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /******/ (function() { // webpackBootstrap
  2. var __webpack_exports__ = {};
  3. /*!**********************************************************!*\
  4. !*** ./resources/js/pages/two-step-verification.init.js ***!
  5. \**********************************************************/
  6. /*
  7. Template Name: Skote - Admin & Dashboard Template
  8. Author: Themesbrand
  9. Website: https://themesbrand.com/
  10. Contact: themesbrand@gmail.com
  11. File: two step verification Init Js File
  12. */
  13. function moveToNext(elem, count) {
  14. if (elem.value.length > 0) {
  15. $("#digit" + count + "-input").focus();
  16. }
  17. }
  18. var count = 1;
  19. $(".two-step").keyup(function (e) {
  20. if (count == 0) {
  21. count = 1;
  22. }
  23. if (e.keyCode === 8) {
  24. if (count == 5) {
  25. count = 3;
  26. }
  27. $("#digit" + count + "-input").focus();
  28. count--;
  29. } else {
  30. if (count > 0) {
  31. count++;
  32. $("#digit" + count + "-input").focus();
  33. }
  34. }
  35. });
  36. /******/ })()
  37. ;