0

当我在 CJuitabs 中按下一个选项卡时,我试图显示一个预加载器,但它没有显示预加载器。有什么我做错了吗?

<div id="OuterTabs">
<?php
$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs' => array(
    'Bundle (' . $BundleTotal . ')' => array(
        'ajax' => $this->createUrl('/Frontier/buyFlow/bundles'),
        'id'=>'BundleTab'
    ),
    'Standalone (' . $InternetTotal . ')' => array(
        'ajax' => $this->createUrl('/Frontier/buyFlow/Standalone'),
        'id'=>'StanadAloneTab'
    ),
    'Phone (' . $PhoneTotal . ')' => array(
        'ajax' => $this->createUrl('/Frontier/buyFlow/Phone'),
        'id'=>'PhoneTab'
    )
)
// panel 3 contains the content rendered by a partial view
,

// additional javascript options for the tabs plugin
'options' => array(
    'collapsible' => true,
    'select'=>"js:function(){ $('#BundleTab').html('Loading...') }",
),
'htmlOptions' => array(
    'style' => 'width:100%;float:left',
),
'id' => 'MyTab-Menu'
));
?>
</div>

谢谢你。

4

1 回答 1

1

尝试删除

'options' => array(
    'collapsible' => true,
    'select'=>"js:function(){ $('#BundleTab').html('Loading...') }",
 ),

并以这种方式通过手动javascript处理它:

<script>
  $(document).ready(function () {
      $('#BundleTab').click(function () {
          $(this).html("Loading...");
      });
  });
</script>
于 2015-04-23T04:32:27.420 回答