A
A
Alex Polyakh2017-08-29 11:36:26
Design
Alex Polyakh, 2017-08-29 11:36:26

Switch between inputs that are next to each other, when the current one is full, switch to the one on the right side and return to the button. 'backspace'?

I solve the problem with native JS.
Four inputs next to each other, the maximum number of values ​​is 2, entered two values ​​into the input switched to the one on the right side, removed the signs returned to the portentous one (which is on the left side).
Found solutions on jQuery, does not suit me.
Help me please.
An example of what it looks like:
https://codepen.io/PolyakhAlex/pen/vJVWKm

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ronald McDonald, 2019-05-07
@obivankenoby

they need a designer who can draw websites, make key visuals, identities, logos, animations, work with after effects.

Well, learn to draw websites, make key visuals, identity, logos, animation, work with after effects and you will be in demand.

V
V Sh., 2017-08-29
@JuniorNoobie

Algorithm:
We process clicking on the button inside the input field. If the number of characters entered in the input field is equal to the maximum number of possible characters, then we pass the focus to the neighboring (right) element. If backspace is pressed and the number of elements in the input form is zero, then go to the previous (left) element, if possible.
And if you found an example in jquery, then what prevented you from rewriting it in native js?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question