2011-01-27 85 views
0

IM增加新的jQuery UI選項卡的標籤jQuery UI的標籤添加標籤奇怪的行爲

sample page(點擊創建一個新的選項卡)

代碼

$('#tabs-2').tabs(
{ 
load: function(e, ui) 
{ 
    $('.show_comment').die('click'); 
    if ($('#tabs-2').tabs('option','selected') == 0) 
    { 
      $('.new_text').click(function(){ 
       $("#tabs-2").tabs("add", 'ushout.jsp' , 'album_name');  
       return false; 
      }); 

      return false; 
     }); 
    } 
} 
, 
selected: 1, 
fx:{height: 'toggle', duration: 'fast'}, 
spinner: '<em>Loading...</em>' , 
collapsible: true 
}); 

而是選擇標籤(album_name)第一次沒有頁面顯示...

但在第二次選擇頁面時顯示頁面

請幫助

感謝

回答

0

添加標籤將與在標籤上

行任何影響此行爲

fx:{height: 'toggle', duration: 'fast'} 

原因造成的問題

使用無效果

$('#tabs-2').tabs(
{ 
load: function(e, ui) 
{ 
$('.show_comment').die('click'); 
if ($('#tabs-2').tabs('option','selected') == 0) 
{ 
     $('.new_text').click(function(){ 
      $("#tabs-2").tabs("add", 'ushout.jsp' , 'album_name');  
      return false; 
     }); 

     return false; 
    }); 
    } 
} 
, 
selected: 1, 
/* fx:{height: 'toggle', duration: 'fast'}, */ 
spinner: '<em>Loading...</em>' , 
collapsible: true 
}); 

謝謝