【发布时间】:2011-07-07 05:04:10
【问题描述】:
我想将加载的 html 从 Ajax 请求添加到 Div 并生效(例如向下滑动)。
我正在使用这段代码,但它还没有效果:
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");
}
}
});
【问题讨论】:
-
我从这个答案写了我的代码,但没有用。
标签: jquery jquery-effects