forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.tinycarousel.d.ts
79 lines (75 loc) · 2.29 KB
/
jquery.tinycarousel.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
// Type definitions for jQuery tinycarousel 1.9
// Project: http://baijs.nl/tinycarousel/
// Definitions by: Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
declare module JQueryTinyCarousel {
export interface JQueryTinyCarouselOptions {
/**
* Start block of the carousel. (default: 1)
*/
start?: number;
/**
* Vertical or horizontal scroller? 'x' or 'y'. (default: 'x')
*/
axis?: string;
/**
* How many blocks do you want to move at a time? (default: 1)
*/
display?: number;
/**
* If interval is true and rewind is true it will play in reverse if the last slide is reached. (default: false)
*/
rewind?: boolean;
/**
* Show left and right navigation buttons? (default: true)
*/
controls?: boolean;
/**
* Show page number navigation buttons? (default: false)
*/
pager?: boolean;
/**
* Move to the next block on an interval. (default: false)
*/
interval?: boolean;
/**
* Interval time in milliseconds. (default: 3000)
*/
intervaltime?: number;
/**
* Show animation when changing block? (default: true)
*/
animation?: boolean;
/**
* Time of the animation in miliseconds (default: 1000)
*/
duration?: number;
/**
* Function that executes after every move (default: null)
*/
callback? : (element: HTMLElement, index: number) => void;
}
}
interface JQuery {
/**
* Creates a new tinycarousel with the specified, or default, options.
*
* @param options The options
*/
tinycarousel(options?: JQueryTinyCarousel.JQueryTinyCarouselOptions): JQuery;
/**
* Moves the tinycarousel to the specified block.
*
* @param index The index of the block to move to
*/
tinycarousel_move(index: number): void;
/**
* Starts the interval.
*/
tinycarousel_start(): void;
/**
* Stops the interval.
*/
tinycarousel_stop(): void;
}