jQuery

【jQuery】水平にスクロールSticky horizontal scroll

August 7, 2016
sticky-hscroll

Sticky horizontal scrollは一部のコンテンツを固定し、横スクロールできるjQueryプラグイン。

Bootstrap responsive table

<div class="table-responsive sticky-hscroll">
  <table class="table">
    ...
  </table>
</div>

With other

<style>
  .sticky-hscroll {
    overflow-x: auto;
  }
</style>

<div class="sticky-hscroll">
  <div>
    <p>Lorem Ipsum is simply...</p>
  </div>
</div>

JS

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="path/to/javascripts/sticky-hscroll.js" type="text/javascript"></script>
$('body').stickyHScroll();