-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
14 lines (9 loc) · 1005 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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.