jquery"queue"方法中的函数只能执行一次?

hh5*_*188 1 queue jquery

这是我的jquery代码:

       $('input').click(function(){
            $('h1').empty().queue(function(){
                console.log('queue');
            });
       });
    });
Run Code Online (Sandbox Code Playgroud)

只有当我第一次点击输入时,萤火虫才会显示'que'

但是当我第二次点击它时,它没有显示任何内容,我怎样才能在点击事件中多次执行队列menthod?

pan*_*-34 7

$('input').click(function()
{
    $('h1').empty().queue(function()
    {
        alert('queue');
        $(this).dequeue();
    });
});
Run Code Online (Sandbox Code Playgroud)