1
1
jQuery UI dial control
2
2
======================
3
3
4
- This is a dial widget for jQuery UI.
4
+ This is a dial widget for jQuery UI. It is made to imitate the dial controls encountered in various audio processing applications.
5
+
6
+ The dial values are represented using an image map. Changing the value of the dial is done by dragging it in a vertical linear motion.
5
7
6
8
Usage
7
9
-----
@@ -15,7 +17,7 @@ You can pass in any additional options and event handlers as arguments to the `d
15
17
$("#something").dial({
16
18
min: 0,
17
19
max: 11,
18
- default : 5,
20
+ value : 5,
19
21
20
22
change: function(event, ui) {
21
23
$("#somethingelse").html("Current value: "+ui.value);
@@ -36,48 +38,68 @@ See the demo directory in the repository for a complete example.
36
38
Options
37
39
-------
38
40
39
- * ` min `
41
+ * ` min ` (Number)
40
42
Minimum value.
41
43
Default: -100
42
44
43
- * ` max `
45
+ * ` max ` (Number)
44
46
Maximum value.
45
47
Default: 100
46
48
47
- * ` default `
49
+ * ` value ` (Number)
48
50
Initial value.
49
51
Default: 25
50
52
51
- * ` unitsPerPixel `
53
+ * ` unitsPerPixel ` (Number)
52
54
Amount of units to change the value per pixel of mouse movement.
53
55
Default: 1
54
56
55
- * ` numImages `
57
+ * ` numImages ` (Number)
56
58
Number of images in the image map.
57
59
Default: TODO
58
60
59
- * ` imageWidth `
61
+ * ` imageWidth ` (Number)
60
62
Width of an individual dial state image.
61
63
Default: TODO
62
64
63
65
Events
64
66
------
65
67
66
- * ` start `
67
- * ` change `
68
- * ` stop `
68
+ * ` start(event, ui) `
69
+ Triggered when the user started dragging the dial.
70
+ The current value of the dial is returned as ` ui.value ` .
71
+
72
+ * ` change(event, ui) `
73
+ Triggered when the user changes the value of the dial.
74
+ The new value of the dial is returned as ` ui.value ` .
75
+
76
+ * ` stop(event, ui) `
77
+ Triggered when the user stopped dragging the dial.
78
+ The current value of the dial is returned as ` ui.value ` .
69
79
70
80
Methods
71
81
-------
72
82
73
- * ` destroy `
74
- * ` disable `
75
- * ` enable `
76
- * ` option ` (individual)
77
- * ` option ` (hash)
78
- * ` widget `
79
- * ` value ` (get)
80
- * ` value ` (set)
83
+ * ` .dial("destroy") `
84
+ Destroys the dial and all data associated with it.
85
+
86
+ * ` .dial("disable") `
87
+ Disables the dial.
88
+
89
+ * ` .dial("enable") `
90
+ Enables the dial.
91
+
92
+ * ` .dial("option", optionName, [value]) `
93
+ Get or set any dial option. If no option is specified, it will act as a getter.
94
+
95
+ * ` .dial("option", options) `
96
+ Set multiple dial options at once by providing an options object.
97
+
98
+ * ` .dial("widget") `
99
+ Returns the .ui-dial element.
100
+
101
+ * ` .dial("value, [newValue]) `
102
+ Get or set the dial value. If no value is specified, it will act as a getter.
81
103
82
104
License
83
105
-------
0 commit comments