我不知道什么标题给予,所以请我道歉,我只是好奇,为什么在下面的代码中,文本变得更改之前,它甚至淡出,即使我'我已经把它淡化了。.text()立即正在处理
$('form').submit(function(){
return false;
});
$('button').on('click',function(){
$(this).addClass('busy');
$(this).parent().find('button').attr('disabled',true);
$(this).parent().find("button:not('.busy')").fadeOut(500);
$('p').text('Processing..').fadeIn(500).trigger('sfsfsf','wala');
});
$('p').on('sfsfsf',function(e,data){
//this line below
$(this).delay(1000).fadeOut(500).text('Complete!');
$(this).fadeIn(500,function(){
$(this).delay(500).fadeOut(500);
});
});
为什么会这样,怎么解决呢?
非常好,现在我明白了。谢谢! – Michelle 2011-12-20 11:05:36