forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.watermark.d.ts
30 lines (23 loc) · 983 Bytes
/
jquery.watermark.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Type definitions for Watermark plugin for jQuery 3.1
// Project: http://jquery-watermark.googlecode.com
// Definitions by: Anwar Javed <https://github.com/anwarjaved>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface WatermarkOptions {
className?: string; // Default class name for all watermarks
useNative?: boolean; // If true, plugin will detect and use native browser support for watermarks, if available. (e.g., WebKit's placeholder attribute.)
hideBeforeUnload?: boolean; // If true, all watermarks will be hidden during the window beforeunload event.
}
interface Watermark {
options: WatermarkOptions;
show(element: string): void;
hide(element: string): void;
showAll(): void;
hideAll(): void;
}
interface JQuery {
watermark(text: string, options?: WatermarkOptions): JQuery;
}
interface JQueryStatic {
watermark: Watermark;
}