javascript - jQuery text not showing properly using fadeIn -


I searched for this problem but could not find the solution that works for me.

I'm trying to do four checkboxs, only three of which can be selected and when the fourth checkbox is selected, the message is faded, which informs the user about the boundary It is the part that fades in the text:

  $ ('# warning'). FadeIn ('slow', function () {$ (this). Stop (). Text ("(You can not have more than 3 selected options)" settimeout (function () {$ ("# warning") FadeOut (300);}, 2500);});   

I could not delay it, so I used setTimeout I do not understand why the fourth checkbox first The time has been clicked, the message immediately shows the Uo what am I doing wrong?

And there is a way to do this even with procrastination instead of set-timer?

Here The whole The code has a link:

Try adding it to the beginning of the script: < ("You can not have more than 3 selected options"); $ ('# warning') show (); $ $ ('# warning'). $ ('# Warning'). );

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -