Skip to content

rylanb/We-Placeholdin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

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.

About

Placeholders jQuery for Non PH browsers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published