There is a function
indentRub: function() { $('.ab_form-col').on('input.ab_input--rubl', 'input.ab_input--rubl[type="text"]', function() { let lengthInputRub = $(this).val().length; // Подсчет символов в инпуте if (lengthInputRub >= 1) { $('.js-ruble-before').css('left', '210px'); } else { $('.js-ruble-before').css('left', '10px'); } }); },
On page 2 of these forms, the classes are also the same. It is necessary that the function is applied to 1 element, i.e. in which the value is entered. This is an input
and near it a div
with the class js-ruble-before
to which the condition should apply. The problem is that the condition applies to all elements with a given class.