0
我有一個div,其中包含一些文章。當用戶點擊下一個按鈕時,我希望現有的文章向左滑動並讓下一頁文章滑入以替換它們。如何在成功的jQuery ajax調用時模仿數據的輪播刷新?
進出口尋找有我的結果左如果用戶如果用戶點擊<上一個鏈接在點擊右邊的>下一個環節或幻燈片幻燈片。 (有點像旋轉木馬)
下面是slideDown動畫的一個工作示例。
//Fetch the new result set.
$.ajax({
url: '/Home/_WhatsNew',
type: 'POST',
data: JSON.stringify(jsonData),
dataType: 'html',
contentType: 'application/json',
//The request was a success. Repopulate the div with new result set.
success: function (data) {
$("#Content").empty();
$(data).hide().appendTo('#Content').slideDown();
},
error: function (data) {
alert('Fail');
}
});
是否有可能以旋轉木馬般的方式做到這一點?
看看['animate'(HTTP:// API。 jquery.com/animate) –