Skip to content

DarkidOP/Word-change-with-scramble-effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This a vanilla js plugin that can be used to loop over words with a scramble animation

Overview

Live Site preview

Built with

  • Vanilla js
  • HTML
  • CSS

Usage

  1. Download the WordScrambleEffect.min.js file.
  2. add the WordScrambleEffect.min.js file to your page using the script (example below)
<script src="./WordScrambleEffect.min.js"></script>
  1. add these variables before the script link tag
<script>
  let scrambleEffectDiv = document.getElementById('text-div'),
  wordsArray = ["Graphics Designer", "Web Developer", "Casual Gamer"],
  animationSpeed = 33,
  animationIntervalSpeed = 1800;
</script>

<script src="./WordScrambleEffect.min.js"></script>

Empty example of varible (copy this):

<script>
  let scrambleEffectDiv = document.getElementById(''), // text div id
  wordsArray = [""], // multiple words can be added 
  animationSpeed = 0, // default 0
  animationIntervalSpeed = 0; // default 0
</script>

Author

About

a word change effect for web with vanilla js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published