jQuery plug-in for autoscrolling text in wrapper. It must work only in case when the wrapper of the text will be less than text. This plug-in reacts to change of page size.
This package can be installed with:
- npm:
npm install --save jquery.autoscroll-text-tape
Or download the latest release.
Load the required stylesheet and JS:
import $ from 'jquery';
import 'imports?jQuery=jquery!jquery.autoscroll-text-tape';
Put the script at the bottom of your markup right after jQuery:
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/jquery.autoscroll-text-tape/dist/autoScrollTextTape.min.js"></script>
Wrap your text with a container element div
.
<div class="text-block">Mama always said life was like a box of chocolates. You never know what you’re gonna get.</div>
Call the plugin function.
$(document).ready(function(){
$('.text-block"').autoTextTape();
});
Property | Type | Description |
---|---|---|
speed | string | Default: 'normal'. The are 3 options: slow , normal , fast |
tapeOffset | int | Default: 0. It's parameter for offset of tape with text on right and left sides. In pixels. |
moveOnHover | bool | Default: false. Text tape will move only after hover |