2013-11-26 98 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(); 
}