Bootstrap-waterfall

Getting Started

Download the production version or the development version.

In your web page:

<body>

  <div id="waterfall-container">
    <!- Should have markups of the list of pins here ->
  </div>

  <script src="jquery.js"></script>
  <script src="bootstrap-waterfall.js"></script>
  <script>
    $(document).ready(function () {
      $('#waterfall-container').waterfall();
    });
  </script>

</body>

That’s it!

Those markups within the waterfall-container should be a repeated list:

<ul class="pin"><img src="" /></ul>
<ul class="pin"><img src="" /></ul>
<ul class="pin"><img src="" /></ul>

or

<div class="pin"><img src="" /></div>
<div class="pin"><img src="" /></div>
<div class="pin"><img src="" /></div>

For instance:

<ul class="pin list-group">
  <li class="list-group-item">
    <a href="javascript:;">
      <img src="images/1.jpg" />
    </a>
  </li>
</ul>
<ul class="pin list-group">
  <li class="list-group-item">
    <a href="javascript:;">
      <img src="images/2.jpg" />
    </a>
  </li>
</ul>
<ul class="pin list-group">
  <li class="list-group-item">
    <a href="javascript:;">
      <img src="images/3.jpg" />
    </a>
  </li>
</ul>

Of cause, you will need to add some styles for the markups at first. I guess you’ve already done that!

Keep in mind:


Q&A:


Documentation

Setup

Examples