Last post Nov 12, 2009 04:21 PM by speednet
Nov 12, 2009 04:21 PM|speednet|LINK
Last night I released the latest version of the Watermark plugin for jQuery (version
The new release fixes a couple of bugs reported, and adds a potential performance boost when a page is submitted or unloaded.
For ASP.NET developers, the previous version had a bug that occurred when a validator was placed on a text box that also had a watermark in place. If a postback occurred without changing the contents of the text box, the watermark would end up being posted
instead of a blank entry.
The new version looks for the existence of the Page_ClientValidate function, and hikacks it if it's found on the page, first hiding all the watermarks on the page, and then calling the original function.
I built-in the capability to look for other functions, so if I get feedback regarding other standard pre-form submission functions in ASP.NET or any other standard platform, I can easily add them to future versions of the plugin.
Another fix was allowing the plugin to work even if the page does not include a form element. It is not proper HTML to code a page like that, but the plugin now allows for it nevertheless.
A final note that some may find interesting: For the minified version (included in the download package), I switched from using YUI Compressor to Microsoft Ajax Minifier. I have found the MS minifier to be vastly superior in terms of code crunching, and
in the process some of the tricks it employs actually produce code that should execute faster.
version into production you'll be able to switch back and forth between the two. URL: http://www.lotterypost.com/js-compress.aspx)
Watermark plugin for jQuery project page:
Download package can be found here:
Are you getting value from the Watermark plugin? Please give it a rating at the jQuery site!
In case you missed them, here's a few of my other plugins, I hope you find them useful too: