qualcentric-web-solutions / jquery-watermark

Automatically exported from code.google.com/p/jquery-watermark
0 stars 0 forks source link

How to get input element value after watermarking it. #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. initial watermark for a input element this way:  
$("#myInput").watermark("Pleae input some text");
2. when user click one button, my script check the input element this way: 
if($("#myInput").val()){ ... } . if user didn't type anything in that input 
element, the if statement will be "true", this is not what I expect.

What is the expected output? What do you see instead?
Is is possible to provide a method like $("#myInput").watermarkVal() , this 
method return empty string if user didn't input anything.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by nathan...@gmail.com on 30 Jun 2010 at 7:22

GoogleCodeExporter commented 8 years ago
Sounds like a good idea, I'll tag it as an enhancement.

Original comment by t...@speednet.biz on 1 Jul 2010 at 12:23

GoogleCodeExporter commented 8 years ago

Original comment by t...@speednet.biz on 3 Dec 2010 at 4:14

GoogleCodeExporter commented 8 years ago
This issue is fixed in version 3.1.

The plugin now enhances the native jQuery .val() function to get and/or set the 
element's value directly.  The plugin handles all the dirty work.

So, you can now use .val() to get and/or set the value, regardless of if there 
is a watermark on the element or not, and whether it uses native watermarks or 
the plugin's functionality.

Original comment by t...@speednet.biz on 21 Dec 2010 at 8:54