Javascript 引导选项卡内容向左滑出和向右滑出生效

Javascript 引导选项卡内容向左滑出和向右滑出生效,javascript,jquery,css,twitter-bootstrap,twitter-bootstrap-3,Javascript,Jquery,Css,Twitter Bootstrap,Twitter Bootstrap 3,我正在处理引导布局,我有导航药片和标签内容,我想在更改标签上创建左滑出和右滑入标签内容 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { var target = $(this).attr('href'); $(target).animate({"left":"-9999px"}, "2000").animate({"left":"0px"}, "2000"); }) 这段代

我正在处理引导布局,我有导航药片和标签内容,我想在更改标签上创建左滑出和右滑入标签内容

    $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {    
        var target = $(this).attr('href');  

  $(target).animate({"left":"-9999px"}, "2000").animate({"left":"0px"}, "2000");
    })
这段代码可以工作,但是选项卡内容没有100%向左滑动,有些内容仍然可见。如何做到这一点,选项卡内容将向左滑动,全部更改,然后向右滑动


非常感谢

也许这样的短信对你有用

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  var target = $(this).attr('href');

  $(target).css('position', 'relative'); // you need position relative in order to apply 'left' 
  $(target).animate({"left":"-2500px"}, 2000).animate({"left":"0"}, 2000);
});