jQuery重新加载div的内容(动态呈现) [英] jQuery reload div's content (dynamically rendered)
本文介绍了jQuery重新加载div的内容(动态呈现)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个通过Expression Engine生成html的div.我正在使用ajax提交:
I have a div that is generated html via Expression Engine. I'm using ajax submit:
$('#login-form').ajaxForm({
// success identifies the function to invoke when the server response
// has been received; here we apply a fade-in effect to the new content
success: function() {
$("#panel").RELOAD!!();//Just refresh this div!
}
});
我只希望#panel div重新加载/刷新.
I just want the #panel div to reload/refresh.
推荐答案
我假设您正在寻找类似的东西:
I assume you looking for something like that:
$('#login-form').ajaxForm({
success: function( data) {
$("#panel").html( data);//Will insert new content inside div element.
}
});
FIX:
$('#login-form').ajaxForm({
target: '#panel', //Will update the "#panel"
success: function( data) {
alert( "Success");
}
});
这篇关于jQuery重新加载div的内容(动态呈现)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文