2013-11-26 100 views
1

目前,我有以下Ajax响应,显示从目标页面检索的某些HTML:该HTML数据显示5秒钟,然后揣jQuery的HTML显示然后隐藏

success: function (data, textStatus, jqXHR) { 
$("#RoomAddResponse").html(data); 
$("#RoomAdd")[0].reset(); 

我如何改变它,再次?

回答

4

与函数的超时将清空#RoomAddResponse

success: function (data, textStatus, jqXHR) { 
    $("#RoomAddResponse").html(data); 
    setTimeout(function(){ 
     $("#RoomAddResponse").empty(); 
    }, 5000); 
    $("#RoomAdd")[0].reset(); 
}