jquery.autoscroll-text-tape
v0.0.2
Published
jQuery plugin for horizontal text scrolling
Downloads
5
Readme
Auto scroll text tape jQuery plugin
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. ##Demo
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 |