2011-01-27 86 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 
}); 

谢谢