作者:手机用户2702934194 | 来源:互联网 | 2023-05-18 04:20
ihavethefollowingproblem.ImtryingtoloadasetoftabloadingdinamicallywithjQuery.When
i have the following problem. I'm trying to load a set of tab loading dinamically with jQuery. When I get the new contents (via POST) the tabs() function abort and don't build the tabs. I'm using this functions:
我有以下问题。我正在尝试使用jQuery加载一组tabam dinamically。当我获得新内容(通过POST)时,tabs()函数中止并且不构建选项卡。我正在使用这个功能:
$(document).ready(function() {
var array_with_alias_id = $.getJSON("/getAliasForMatchAll/", null,
function (data){
array = data.aliases_id;
load(array);
});
$("#next_left").click(function(){next_left()});
//load(array_with_alias_id);
});
function next_left(){
if(j >= array.length-1){
var l = j
} else {
var l = j+=1;
}
$("#alias_id_left").val(list_left[l]);
$("#merge_alias_id_left").val(list_left[l]);
$.post("/visor/",{"alias_id":list_left[l],"position":"L"},
function(data){
$("#tabsL").html(data).ready(function(){
$("#tabsL").tabs();
});
});
}
I think that my problem is an ajax problem and i have read this [0], but i can't give with the solution. The function next_left() it works only one time. I think that the document for this function is ready, but when i load the tabs it doesnt work (i think that tab call the method abort, because if i see the html with firebug it change, but not all).
我认为我的问题是一个ajax问题,我已经阅读了这个[0],但我不能给出解决方案。函数next_left()只能运行一次。我认为这个函数的文档已经准备就绪,但是当我加载选项卡时它不起作用(我认为选项卡调用方法中止,因为如果我看到带有firebug的html它会改变,但不是全部)。
Any clue?
任何线索?
[0]http://docs.jquery.com/Tutorials:AJAX_and_Events
[0] http://docs.jquery.com/Tutorials:AJAX_and_Events
2 个解决方案