forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.tipsy.d.ts
107 lines (103 loc) · 2.65 KB
/
jquery.tipsy.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Type definitions for jQuery.tipsy
// Project: http://onehackoranother.com/projects/jquery/tipsy/
// Definitions by: Brian Dukes <https://github.com/bdukes/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface JQuery {
/**
* initialize tipsy plugin
*/
tipsy: JQueryTipsy.Tipsy;
}
declare module JQueryTipsy {
interface Options {
/**
* delay before showing tooltip (ms)
*
* default: 0
*/
delayIn?: number;
/**
* delay before hiding tooltip (ms)
*
* default: 0
*/
delayOut?: number;
/**
* fade tooltips in/out?
*
* default: false
*/
fade?: boolean;
/**
* fallback text to use when no tooltip text
*
* default: ''
*/
fallback?: string;
/**
* gravity
*
* default: 'n'
*/
gravity?: any; // string or () => string
/**
* is tooltip content HTML?
*
* default: false
*/
html?: boolean;
/**
* use live event support?
*
* default: false
*/
live?: boolean;
/**
* pixel offset of tooltip from element
*
* default: 0
*/
offset?: number;
/**
* opacity of tooltip
*
* default: 0.8
*/
opacity?: number;
/**
* attribute/callback containing tooltip text
*
* default: 'title'
*/
title?: any; // string or () => string
/**
* how tooltip is triggered - hover | focus | manual
*
* default: 'hover'
*/
trigger?: string;
}
interface Tipsy {
/**
* initialize tipsy plugin
*/
(options?: Options): JQuery;
/**
* determine gravity either to North or South automatically based on the element's location in the viewport
*/
autoNS: () => string;
/**
* determine gravity either to West or East automatically based on the element's location in the viewport
*/
autoWE: () => string;
/**
* determine gravity either to Southwest or Southeast automatically based on the element's location in the viewport
*/
autoSWSE: () => string;
/**
* determine gravity either to Northwest or Northeast automatically based on the element's location in the viewport
*/
autoNWNE: () => string;
}
}