2

Here is my jquery code:

       $('input').click(function(){
            $('h1').empty().queue(function(){
                console.log('queue');
            });
       });
    });

Only the first time I click the input,the firebug would show‘queue’

but when I click it the second time,it doesn't show anything,how can I execute the queue menthod in click event in more times?

1 Answer 1

8
$('input').click(function()
{
    $('h1').empty().queue(function()
    {
        alert('queue');
        $(this).dequeue();
    });
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.