1. add $.watermark.options.defaultWaterMark, when call
$(<selector>).watermark(text, options) time, the text is nullorempty, use
defaultWaterMark.
2. support the watermark-text on element attribute. example :
<input type="text" watermark="cccc" />
<script>
$(function(){
// all has watermark attribute element, show watermark.
$('[watermark]').watermark();
});
</script>
3. 1 && 2 feature, call the watermark can to short, example
<style>
.redfont{
font: red;
}
</style>
<input id="one" type="text" watermark="cccc" />
<input id="two" type="text" watermark />
<script>
$(function(){
// all has watermark attribute element, show watermark.
$('[watermark]').watermark({className: 'redfont'});
});
</script>
result:
1. all the watermark className is change to redfont.
2. $('#two') element, watermark-text is $.watermark.options.defaultWaterMark
value.
that's all...
i come from china, english no good, Please forgive me。
If do not understand, please call me mail. ygaSonic@gmail.com
attach my change jquery.watermark from 3.1.3, Increase of the above three
functions.
Original issue reported on code.google.com by ygaSo...@gmail.com on 9 Jun 2012 at 4:11
Original issue reported on code.google.com by
ygaSo...@gmail.com
on 9 Jun 2012 at 4:11Attachments: