Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
    <script src="http://flightjs.github.io/release/latest/flight.js"></script>
    <meta charset="utf-8">
    <title>Dealing with mulitple instances of communicating components</title>
        
  </head>
  <body>
  <div class="carousel js-carousel">
    <div class="carousel__transport js-carousel__transport">
      <div class="carousel__item js-carousel__item">1</div>
      <div class="carousel__item js-carousel__item">2</div>
      <div class="carousel__item js-carousel__item">3</div>
    </div>
  </div>
  <ul class="pagination js-pagination">
    <li class="pagination__indicator js-pagination__indicator">One</li>
    <li class="pagination__indicator js-pagination__indicator">Two</li>
    <li class="pagination__indicator js-pagination__indicator">Three</li>
  </ul>
  <div class="carousel js-carousel">
    <div class="carousel__transport js-carousel__transport">
      <div class="carousel__item js-carousel__item">1</div>
      <div class="carousel__item js-carousel__item">2</div>
    </div>
  </div>
  <ul class="pagination js-pagination">
    <li class="pagination__indicator js-pagination__indicator">One</li>
    <li class="pagination__indicator js-pagination__indicator">Two</li>
  </ul>
  </body>
</html>
 
/* Base*/
    * { margin: 0; padding: 0; font-family: sans-serif; }
/* Carousel*/
.carousel { width: 600px; height: 400px; background: #ccc; overflow: hidden; position: relative; }
.carousel__transport { -webkit-transition: left 0.2s; position: relative; display: inline-block; white-space: nowrap; }
.carousel__item { display: inline-block; width: 600px; height: 400px; outline: 1px solid yellow; line-height: 400px; text-align: center; font-size: 20px; }
/* Pagination*/
.pagination { margin-bottom: 20px; padding-top: 10px; width: 600px; text-align: center; margin-left: -10px; }
.pagination__indicator { text-indent: -9999px; margin-left: 10px; width: 30px; height: 30px; display: inline-block; background: #ccc; border-radius: 999px; opacity: 0.5; }
.pagination__indicator.is-current { opacity: 1; }
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
joecritchpro
0viewers