A
A
Alexander Sobolev2018-12-19 20:00:09
css
Alexander Sobolev, 2018-12-19 20:00:09

How to catch a change in the value of the input variable?

Hello!
Situation:
1) There are three inputs: name and login and surename .
2) If when filling in name (and\or surename) the login field is empty, then in login there is an auto-substitution of the name and surename values. [Customer asked to make a "auto-dial" of the login, so as not to "break the brain"]
3) The login field has validation by changing the value. It works on .on('change') but doesn't work on auto-substitution. And if (theoretically) there are two or more Ivan Petrov-Sidorov during auto-substitution, then the login should not be Ivan and the check should return false. There is an option to run a login check on changes, but it seems to me that this is a garden.
How to catch jQuery('#login').val() change outside of manual input ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan, 2016-02-18
@Pashkes

With jQuery:

<div id="out" onmouseout='$("#out").fadeOut(500);'>Lorem Ipsum Dolor</div>

A
alfik197, 2016-02-18
@alfik197

you can use animate.css, don't forget to include jquery

N
Nikita, 2016-02-18
@dbmb

It is possible through opacity and hover
for example:
div {
opacity: 0;
transition: .3s
}
div:hover {
opacity: 1
}

D
DanKud, 2018-12-19
@san_jorich

Call an event trigger on autowiring:
jQuery('#login').trigger('change');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question