Hello!
There is a text field, let it be the login, it is generated by the module through some kind of system. The source code could not be found - as it is generated - but there is its id=#mb6b22feu_input_username
. I want to make sure that when I focus on this input, I’ll remove the inscription "Login" to an empty value. How to do, I already understood
if (this.value == 'Логин'){ this.value = ''; }
But the problem is that there is no default text, it is necessary that the default was the text Login. It is necessary to do this somehow via jQuery, since I could not find the source for generating this form! Help people? Below is the complete jquery code:
$(document).ready(function () { $('#mb6b22feu_input_username').focus(function () { if (this.value == 'Логин') { this.value = ''; } }); });