Answer the question
In order to leave comments, you need to log in
Why doesn't the second element in .queue work?
There is this script:
<script>
$(document).ready(function(){
$( "#anm-wrong" ).click(function() {
$(".forms-block").queue(function() {
$(this).toggleClass( "animated shake" );
$(this).toggleClass( "animated shake" );
$(this).dequeue();
});
});
});
</script>
<script>
$(document).ready(function(){
$( "#anm-wrong" ).click(function() {
$(".placeHolder").queue(function() {
$(this).toggleClass( "required", 500 );
$(this).toggleClass( "required", 500 );
$(this).dequeue();
});
});
});
</script>
Answer the question
In order to leave comments, you need to log in
In the first example you add and immediately remove animated shake classes, in the second example you always add animated shake classes because pass 500 as the second argument, although the docs say that you should simply pass true / false: true - will add a class, false - will remove, i.e. you add twice. And bool from 500 is always true
I come home shorter, I press the switch 2 times in a row, but the light does not light up, and if you press it 1 time it starts to work. What am I doing wrong?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question