2015-04-22 73 views
0

我想在CJuitabs中按下一個標籤時顯示預加載器,但它不顯示預編碼器。我做錯了什麼?如何在使用yii 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> 

謝謝。

回答

1

嘗試刪除

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

並以這種方式通過人工的JavaScript處理:

<script> 
    $(document).ready(function() { 
     $('#BundleTab').click(function() { 
      $(this).html("Loading..."); 
     }); 
    }); 
</script> 
+0

真棒。謝謝。 – user1960170

+0

不客氣! – hamed

相關問題