I have a problem in that I am using a simple watermark plugin such that it works
jQuery('#selector').Watermark('Watermark text here ...');
The problem is - when I try and use something like
if (jQuery('#selector').val() != "") { //do stuff }
The statement is True because of the watermark. Is there anyway I can somehow "ignore" this watermark value for my If statement ?
Thanks
if (jQuery('#selector').val() != "" && jQuery('#selector').val() != "'Watermark text here ...'") { //do stuff }
This only assumes that the watermark text is static across examples. If not then you may need a collection of watermark texts?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With