简体   繁体   English

jQuery UI标签添加标签奇怪的行为

[英]jquery ui tabs add tab strange behaviour

im adding new jquery ui tabs to a tab 即时通讯添加新的jQuery UI标签到标签

the sample page (click on Create a new Tab) 示例页面 (单击“创建新选项卡”)

the code 编码

  $('#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
});

but on selecting the tab(album_name) first time no page is displayed... 但是第一次选择选项卡(相册名称)时没有显示任何页面...

but on selecting the tab second time the page is displayed 但是在第二次选择选项卡时显示页面

please help 请帮忙

thanks 谢谢

adding tabs will have this behaviour with any effects on the tabs 添加选项卡将具有此行为,并对选项卡产生任何影响

the line 线

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

is causing the problem 导致问题

use with no effects 使用无影响

$('#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
});

thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM