Bootstrap Carousel Not working

Я пытаюсь реализовать карусель Twitter Bootstrap и пока безуспешно. У меня есть следующая страница:

<!DOCTYPE html>
<html lang = "en">
<head>
  <meta charset="utf-8">
  <title>Fluxware: Play, learn and build games</title>
  <meta name="description" content="Home page for Fluxware">
  <meta name="author" content="Tim Butram">

  <!-- CSS Stylesheets -->
  <link href="../bootstrap/css/bootstrap.css" rel="stylesheet">

  <link href="../bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

  <!--For shitty webbrowsers -->
  <!--[if lt IE 9]>
    <script src="//html5shim.googlecode.com/sbn/trunk/html5.js></script>
  <![endif]-->

  <!-- Favicon -->
  <link rel="favicon" href="images/favicon.ico">
</head>

<body>

  <!-- Navbar -->

  <div class="navbar">
    <div class="navbar-inner">
      <div class="container">
        <ul class="nav">
          <li class="active"><a href="#">Home</a></li>
          <li><a href="#">Play</a></li>
          <li><a href="#">Learn</a></li>

          <li><a href="#">Build</a></li>
        </ul>
      </div>
    </div>
  </div>

  <!-- Grid -->
  <div class="container">
  <div class="row">

    <div class="span12">
      <div class="hero-unit">
    <div id="myCarousel" class="carousel">
          <div class="carousel-inner">
            <div class="active item"><img src="/images/1.png" /></div>
        <div class="item"><img src="./images/2.png" /></div>
        <div class="item"><img src="./images/3.png" /></div>
          </div>

      <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
      <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
        </div>
      </div>

      <div class="row">
        <div class="span4">
           <a class="btn btn-large">Play</a>
       <p>Play games created with Fluxware.</p>

        </div>

    <div class="span4">
      <a class="btn btn-large">Learn</a>
      <p>Learn how to create games and game assets</p>
    </div>

    <div class="span4">
          <a class="btn btn-large">Build</a>

      <p>Use the Fluxware tools to create game.</p>
        </div>
      </div>
    </div>
  </div>
  </div>
  <script src="../bootstrap/js/jquery.js"></script>
  <script src="../bootstrap/js/bootstrap-carousel.js"></script>

  <script src="../bootstrap/js/bootstrap-transition.js"></script>
</body>
</html>

И все, кажется, отображается правильно, кроме карусели. Из чтения страницы Bootstrap следует, что мне нужно куда-то вставить a

$('.myCarousel').carousel();

, но я понятия не имею, куда, как и зачем. В дополнение к этому, в консоли ошибок Firefox я получаю две ошибки

$ is undefined

в bootstrap-carousel.js [строка 125] и

$ is not a function

в bootstrap-transition.js [строка 22]

5
задан Atrus 19 February 2012 в 21:12
поделиться