我想從Ajax請求添加加載的HTML Div效果(例如向下滑動)。
我使用這個代碼,但它並沒有影響尚未:將Html添加到Div效果jQuery
obj.html(msg.d).show('slow');
這可能嗎?
更新:這是我的全碼:
$.ajax({
type: "POST",
url: options.webServiceName + "/" + options.renderUCMethod,
data: options.ucMethodJsonParams,
contentType: "application/json; charset=utf-8",
dataType: "json",
cache: true,
success:
function (msg) {
var html = msg.d;
obj.html(msg.d).show('slow');
// if specified make callback and pass element
if (options.completeHandler)
options.completeHandler(this);
},
error:
function (XMLHttpRequest, textStatus, errorThrown) {
if (options.errorHandler) {
options.errorHandler(this);
} else {
obj.html("error");
}
}
});
看看這個答案http://stackoverflow.com/questions/1520178/jquery-using-append-with-effects –
我寫了我的代碼從這個答案,但不工作。 – Shahin