PageSourceSearch

https://whynot.jp/wordpress/wp-content/themes/osake/js/updnWatermark.js

js whynot.jp collected 2026-09-30 23:14:36 UTC 1,739 bytes, 52 lines download raw bytes

1/*
2* jQuery Watermark Plugin
3*   http://updatepanel.net/2009/04/17/jquery-watermark-plugin/
4*
5* Copyright (c) 2009 Ting Zwei Kuei
6*
7* Dual licensed under the MIT and GPL licenses.
8*   http://www.opensource.org/licenses/mit-license.php
9*   http://www.gnu.org/licenses/gpl.html
10*/
11(function($) {
12    $.fn.updnWatermark = function(options) {
13        options = $.extend({}, $.fn.updnWatermark.defaults, options);
14        return this.each(function() {
15            // only create watermark if title attribute exists
16            if (this.title) {
17                var $input = $(this);
18                var pos = $input.position();
19                var $label = $(document.createElement("label"))
20                    .text(this.title)
21                    .attr("for", this.id)
22                    .css({
23                        position: "absolute"
24                    })
25                    .addClass(options.cssClass)
26                    .hide()
27                    .insertBefore(this);
28                $input
29                    .focus(function(ev) {
30                        $label.hide();
31                    })
32                    .blur(function(ev) {
33                        if (!$(this).val()) {
34                            $label.fadeIn("fast");
35                        }
36                    });
37                // set initial state
38                if (!$input.val()) {
39                    $label.fadeIn("fast");
40                }
41            }
42        });
43    };
44    $.fn.updnWatermark.defaults = {
45        cssClass: "updnWatermark"
46    };
47    $.updnWatermark = {
48        attachAll: function(options) {
49            $("input:text[title!=''],input:password[title!=''],textarea[title!='']").updnWatermark(options);
50        }
51    };
52})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.