Reputation: 15626
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?
Upvotes: 2
Views: 1042
Reputation: 4209
$('input').click(function()
{
$('h1').empty().queue(function()
{
alert('queue');
$(this).dequeue();
});
});
Upvotes: 8