Home > We-Placeholdin

We-Placeholdin

We-Placeholdin is a project mainly written in JavaScript, it's free.

Placeholders jQuery for Non PH browsers

Simple plugin to create placeholder functionality for textarea/text field with type password or text.

Just add .placehold_me(); to the selector for the type of input you want 'placeholder-ed', i.e.: $('input[type="text"], input[type="email"]').placehold_me(); $('input[type="password"]').placehold_me(); $('textarea').placehold_me();

The text field must also have an attribute placeholder which contains the text you want 'placeheld'.

You'll want to style the span class 'pass-span' with padding or position: relative, top: #px if you want to move down the spans a bit. The same goes for left alignment. I apologize, but I can't predict how you'll style your inputs and their respective text without making the plugin heaver than 3 lines of CSS.

Please feel free to add comments or suggestions. I'm always up for constructive criticisms and learning opportunities.

Updated to include jQuery Plugin Skeleton from https://github.com/OscarGodson/jQuery-Plugin-Skeleton.