Auto scroll text tape jQuery plugin
demo link
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.
Quick start
Install
This package can be installed with:
- npm:
npm install --save jquery.autoscroll-text-tape
Or download the latest release.
Load
Webpack
Load the required stylesheet and JS:
import $ from 'jquery'; import 'imports?jQuery=jquery!jquery.autoscroll-text-tape';
Static HTML
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>
Usage
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(); });
Options
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 |