trooprr / jquery-watermark

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

the filter 'selWatermarkDefined' is not doing is job properly #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
in your Show function, the filter doesnt do his job correctly:
$(selector).filter(selWatermarkDefined)

suppose i have 3 textbox and the first one doesnt have a watermark, the
filter doesnt exlude it.

im using jQuery 1.4.2 with watermark 3.0.4
the problem occurs both in IE and FF

Original issue reported on code.google.com by alex.jo...@hotmail.com on 30 Apr 2010 at 5:25

GoogleCodeExporter commented 8 years ago
"selWatermarkDefined" is an interal variable inside the code, not something 
that is 
publicly-accessible by your code.

Internal variable names are purposely hidden from other code to avoid polluting 
the 
global namespace.  In fact, the internal variable names are completely 
different 
(and much shorter) if you use the minified version.

If you want to test to see if a watermark is set on a textbox, use:

$(selector).filter(":data(watermark)")

or use a combined selector like:

$("input:data(watermark)")

The :data(...) selector is something that the Watermark plugin adds to jQuery 
when 
you load the plugin script.  It is my hope that someday the jQuery team will 
add 
a :data() selector, but today you need to load my plugin to use it.

Original comment by t...@speednet.biz on 9 May 2010 at 7:19