2017 © Pedro Peláez
 

library scroll-box

image

thatsus/scroll-box

  • Monday, December 7, 2015
  • by rlambertsen
  • Repository
  • 3 Watchers
  • 0 Stars
  • 38 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 12 % Grown

The README.md

jQuery Scrollbox Build Status

jQuery Scrollbox is a lightweight plugin that enables you to scroll a list of html elements (text, image, etc...) like a carousel slider or traditional marquee., (*1)

Features

  • Simple and lightweight
  • Vertical and horizontal scroll
  • Auto play
  • Multiple instances on one page
  • Pause on hover over
  • Useful options to customize your list scrolling
  • Prev / Next navigation buttons
  • Queue container for advanced usages

Basic Usage

1. Include the latest jQuery library and jQuery Scrollbox Plugin on the page

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="jquery.scrollbox.js"></script>

2. Create a list of text you want to scroll

<div id="demo" class="scroll-text">
  <ul>
    <li>item 1</li>
    <li>item 2</li>
    <li>item 3</li>
  </ul>
</div>

3. Style html elements as below

scrollbox elements diagram, (*2)

4. Initialization

$('#demo').scrollbox();

Demos

http://wmh.github.io/jquery-scrollbox/, (*3)

More examples

Non-infinite Loop

$('#demo').scrollbox({
  infiniteLoop: false,
  switchAmount: 3
});

Callback functions

$('#demo').scrollbox({
  afterForward: function (data) {
    console.log(data.currentFirstChild);
    if (data.switchCount >= 3) {
      this.trigger('backward');
    }
  },
  afterBackward: function (data) {
    console.log(data);
  }
});

License

jQuery Scrollbox is open-sourced software licensed under the MIT license, (*4)

The Versions

07/12 2015

dev-master

9999999-dev

  Sources   Download

07/12 2015

v1.4.3

1.4.3.0

  Sources   Download

07/12 2015

v1.5

1.5.0.0

  Sources   Download