airbnb / infinity

UITableViews for the web (DEPRECATED)
http://airbnb.io/infinity/
Other
2.8k stars 281 forks source link

Enable infinity in HTML Table #56

Open marlonmleite opened 8 years ago

marlonmleite commented 8 years ago

Hello,

Is there any way we can easily enable infinity in of a

html? I tried and fails, Example:

    <table class="table table-striped">
      <thead>
        <tr>
          <th>First Name</th>
          <th>Last Name</th>
          <th>Username</th>
        </tr>
      </thead>
      <tbody id="tableContainer">

      </tbody>
    </table>

    <script type="text/javascript">
        $(function(){
            var $el = $('#tableContainer');
            var listView = new infinity.ListView($el);

            for (var i = 0; i < 1000; i++) {
                var $newContent = $('<tr><td>Mark</td><td>Otto</td><td>@mdo</td></tr>');

                listView.append($newContent);   
            }
        });
    </script>