4

Twitterブートストラップカルーセルでページを読み込んだ後に左ボタンを非表示にするにはどうすればよいですか?

http://twitter.github.com/bootstrap/javascript.html#carousel

私の試み(最初のアクションの後に機能します、私はいつも必要です):

$('#myCarousel').on('slid', '', function() {
    var $this = $(this);

    $this.children('.carousel-control').show();
    if($('.carousel-inner .item:first').hasClass('active')) {
      $this.children('.left.carousel-control').hide();
    } 
    else if($('.carousel-inner .item:last').hasClass('active')) {
      $this.children('.right.carousel-control').hide();
  }

});
4

1 に答える 1