Javascript jQuery选项卡集成了多个选项

Javascript jQuery选项卡集成了多个选项,javascript,jquery-ui-tabs,Javascript,Jquery Ui Tabs,我是个彻头彻尾的傻瓜。我现在正在使用这个: $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html( "Couldn't load this tab. We'll try to fix this as soon as possible."

我是个彻头彻尾的傻瓜。我现在正在使用这个:

$(function() {
   $("#tabs").tabs({
      ajaxOptions: {
         error: function(xhr, status, index, anchor) {
            $(anchor.hash).html(
               "Couldn't load this tab. We'll try to fix this as soon as possible.");
         }
      }
   });
});
有人能告诉我如何将此选项添加到其中:

spinner: 'Loading...'

来源:

您必须用


为了测试它,您应该进行一个ajax调用,并进行一些延迟。我调用了一个MVC操作,使线程处于休眠状态2秒。

对于加载部分,您可以将其添加到beforeSend:function(){}您尝试过我的解决方案吗?
<li><a href="#tabs-1"><span>Test 1</span></a></li>
<li><a href="#tabs-2"><span>Test 2</span></a></li>
<li><a href="#tabs-3"><span>Test 3</span></a></li>
<li><a href="Home/About"><span>Test Ajax</span></a></li>    
$("#tabs").tabs({
    ajaxOptions: {
        error: function(xhr, status, index, anchor) {
            $(anchor.hash).html(
                    "Couldn't load this tab. We'll try to fix this as soon as possible. " +
                    "If this wouldn't be a demo.");
        }
    }
});

$("#tabs").tabs("option", "spinner", 'Retrieving data...');