1c-bitrix partner
Sergey Estrin personal site


Version 0.9.4
Version 0.9.2






Plugin commonly works like placeholder attribute for input fields in Safari and Chrome browsers. Text, password, and textarea fields supported.


Option Default value Description Sample code
placeholded_class "placeholder" Placeholded class name.  
caption_prefix "" String caption prefix.  
caption_postfix "" String caption postfix.  
container false Add placeholder attribute to input and textarea tags inside specific containers. This may be useful, when using input tags, generated by CMS or php code and no posibility to add placeholder attribute. <div class="form-field-container"> <div class="form-field-caption" style="display: none">Input caption</div> <input type="text" name="name" value="" /> </div>
container_selector ".form-field-container" Container selector. Applicable when container: true.
caption_selector ".form-field-caption" Selector of caption inside container. Applicable when container: true.
By default, plugin called in the end of plugin script file with default parameters. Plugin must be called only once.

Sample custom calls

Use container:

$(":input[placeholder], textarea[placeholder]").placeholder({container: true});

Use custom placeholded class

$(":input[placeholder], textarea[placeholder]").placeholder({placeholded_class: "my-placeholder"});

Only inputs with default parameters:



Plugin released under the MIT license.
Home   ·   jQuery   ·   Contacts