@yama-dev/js-random-module

0.5.0 • Public • Published

RANDOM MODULE


Feature

It's a random action utility.


Demo


Installation,Download


Using

NPM Usage

# install npm.
npm install --save-dev @yama-dev/js-random-module
// import.
import RANDOM_MODULE from '@yama-dev/js-random-module';

Basic Standalone Usage

<div class="js-bg">
  <div class="js-bg-item">test-1</div>
  <div class="js-bg-item">test-2</div>
  <div class="js-bg-item">test-3</div>
  <div class="js-bg-item">test-4</div>
  <div class="js-bg-item">test-5</div>
</div>

<script src="./js-random-module.js"></script>
<script>
const RAM = new RANDOM_MODULE('.js-bg-item',{
  elemWrap: '.js-bg',
  durationX2: 3000,
  interval: 1000,
  intervalDeflection: 500,
  addClassName: ['is-active','is-current'],
  autoStart: true,
  preStartCount: 1,
  leaveStop: true,
  positionRandom: true,
  repeat: true
});
</script>

Dependencies

none


Licence

MIT


Author

yama-dev

Readme

Keywords

Package Sidebar

Install

npm i @yama-dev/js-random-module

Weekly Downloads

3

Version

0.5.0

License

MIT

Unpacked Size

26.3 kB

Total Files

8

Last publish

Collaborators

  • yama-dev