Animated Text Filed Placeholder with Placeholdem.js

Category: Form , Javascript | June 13, 2018
Author: jackrugile
Views Total: 3,228
Official Page: Go to website
Last Update: June 13, 2018
License: MIT

Preview:

Animated Text Filed Placeholder with Placeholdem.js

Description:

Placeholdem.js is a lightweight javascript plugin that animates the placeholder with a typewriting effect for input of textarea. The placeholder value will incrementally delete on focus, and restore on blur. Works with modern browsers that support Html 5 placeholder attribute.

How to use it:

Create a text filed with placeholder attribute.

<input name="field" placeholder="CSSScript.Net" />

Include the placeholdem.js in the page, before the closing </body> tag.

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

Run Placeholdem on all elements with placeholders.

Placeholdem( document.querySelectorAll( '[placeholder]' ) );

Changelog:

v1.0.2 (06/13/2018)

  • restore placeholder text when a form reset action occurs

One thought on “Animated Text Filed Placeholder with Placeholdem.js

  1. damian

    hello, how do to validate if the input is empty?, the val () method does not return empty, it returns the value of the placeholder

    $(“#idInput”).val()

    Reply

Leave a Reply