JavaScript Library To Create Animated Placeholder Text In Text Field

Category: Form , Javascript | July 25, 2016
Author:derekxwu
Views Total:843 views
Official Page:Go to website
Last Update:July 25, 2016
License:MIT

Preview:

JavaScript Library To Create Animated Placeholder Text In Text Field

Description:

active-placeholder is a lightweight JavaScript to animate placeholder text in the input field.

Basic usage:

Just download and include the active-placeholder’s script in the document and we’re ready to go.

<script src="active-placeholder.js"></script>

Specify an array of strings for the animated placeholder text you want to rotate through.

var myInput = document.getElementById('myInput');
var activePlaceholder = new ActivePlaceholder(
myInput, 'I Love', ['JavaScript', 'Python']);

Start the animation.

activePlaceholder.start();

Stop the animation.

activePlaceholder.stop();

You Might Be Interested In:


Leave a Reply