Takes any provided <input type="text">
or <textarea>
field that has a placeholder
attribute and uses the value of the placeholder attribute to make a placeholder or hint for that field. The placeholder will disappear when the user focuses on the field and return if the user leaves the field and there is no text entered by the user.
This uses the Watermark plugin.
Just add a placeholder attribute to any input/textarea fields you want the watermark to be applied to.
<input type="text" id="example" name="example" placeholder="text hint here" />
There are a few "ui-watermark-*" classes that are required. It is very small so the content can just be added to any existing css files.
These are the variables that you can set to turn on and off various options.
$("#example").watermark({animate:true});
Name | Type | Default | Options | Description |
---|---|---|---|---|
animate | boolean | true | Should the placeholder animate in/out or not | |
opacity | number | 0 | Opacity level when the user focuses/clicks on the field |
Options = The script only recognizes these values
There is no currently exposed API via the IxF.