重新加载Ajax选项卡的内容

重新加载Ajax选项卡的内容

本文介绍了重新加载Ajax选项卡的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全感到困惑,我在Jquery UI选项卡内进行了ajax调用,此后,我想刷新选项卡的内容,应该执行的功能是:

I'm completely puzzled, I make an ajax call inside a Jquery UI Tab, after that I want to refresh the content of the tab, the function that should be doing it is:

function reloadTab(){
var $tabs = $('#tabs').tabs();
var selected = $tabs.tabs('option', 'selected');
$tabs.tabs('load', selected);
return false;
}

难以置信,但事实如此,它根本不起作用,因为:

Incredible but true it doesn't work at all, since this:

$tabs.tabs('select', selected);

我也不认为这是无法重新加载标签页的问题,这就是我发现的问题:

Wouldn't work either I thought it was an issue with not being able to reload a tab, and this is what I found out:

选择"仅用于选择与当前选项卡不同的选项卡,而加载根本不起作用.

'select' works only to select a different tab than the current one while load doesn't work at all.

我也尝试了发布在此处的解决方案:卡住了重新加载ajax以编程方式显示在jQuery Tab中的内容

I also tried the solution posted here: Stuck reloading ajax content in a jQuery Tab programatically

没有运气..请帮助我,因为我开始生气:-(

With no luck.. please help me because I'm starting to get angry :-(

推荐答案

请您澄清一下:所选内容是否包含期望值,即是否包含

Could you please clarify: Does selected contain the expected value, i.e. does

$tabs.tabs('option', 'selected')

产生正确的索引?如果确实如此,则tabs('load')似乎有问题(如您提到的帖子中所建议).也许您可以尝试切换到另一个选项卡,进行加载,然后再次切换回去.我不是很优雅.抱歉,我没有更多帮助.

produce the correct index? If it does, then tabs('load') appears to be buggy (as suggested in the post you mentioned). Maybe you could try switching to another tab, do the load, then switch back again. Not very elegant, I know. Sorry I can't be of more help.

这篇关于重新加载Ajax选项卡的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 10:45