The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
JQuery TinyWatermark Plugin
Simplest watermark plugin ever
It can be used on any input, textarea and select element. Simply specify the css class for the watermark and the text to display as watermark.
Why is it different? Because it's simple and small (only 500 B), and does not mixe the input text with the watermark as other plugins do (instead of comparing the entered text with the watermark text uses an inner variable to store the current status).
On form submit automatically removes the watermark text.
How to use?
// HTML
<input type="text" class="watermarked" />
// jQuery
$('.watermarked').watermark('watermark', 'Enter text here');
// CSS
.watermark {color:#999}
Title as watermark
If you want to use the title attribute to specify the watermark text, try this code:
// HTML
<input type="text" class="watermarked" title="Enter text here" />
// jQuery
$('.watermarked').each(function() {
$(this).watermark('watermark', $(this).attr('title'));
});
Removing watermarks
If for any reason want to remove watermark text (ex. for JavaScript processing) you can use the removeWatermark function.
// jQuery
$('.watermarked').removeWatermark();Documentation
More information, examples and documentation comming soon...
Visit author's website: www.weblap.ro
