Animated Text Filed Placeholder with Placeholdem.js

Category: Form , Javascript | February 14, 2014
Author:
Views Total: 2,726
Official Page: Go to website
Last Update: February 14, 2014
License: MIT

Preview:

Animated Text Filed Placeholder with Placeholdem.js

Description:

Placeholdem.js is a lightweight javascript plugin that animate 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]' ) );

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