ssmkalyan / jquery-watermark

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

Adding data-watermark custom attribute to input causes watermark to be black and not work on clicking #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get attached HTML, hook up the correct watermark script
2. Run the code. The watermark is there but black. Clicking it does not remove 
it.
3. Change the HTML code data-watermark to be data-watermark2 and re-run
4. Works as expected

What is the expected output? What do you see instead?

As described.

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

Latest, Mac OS X Lion, Chrome OS Latest, Firefox Latest

Original issue reported on code.google.com by allist...@gmail.com on 2 Jan 2012 at 3:36

Attachments:

GoogleCodeExporter commented 9 years ago
This is expected behavior, because internally the plugin uses a data property 
called "watermark", and by specifying the same name as an attribute, you are 
overwriting the internal property name.

If you really want to use your own attribute called "data-watermark", you need 
to customize the code to use a different data name.  It's pretty easy to do, 
since all the data names are defined at the start of the code in variables.

Original comment by t...@speednet.biz on 2 Jan 2012 at 8:05