Skip to content

Commit f908d49

Browse files
Documentation update
1 parent 038bfc2 commit f908d49

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ <h3 id="slider_examples">Slider Modifications</h3>
605605

606606
<!-- ============= example -->
607607
<div class="example-container">
608-
<p>Use dropdowns instead of sliders</p>
608+
<p>Use dropdowns instead of sliders. By default if slider is not available dropdowns will be used.</p>
609609
<div>
610610
<input type="text" name="slider_example_4" id="slider_example_4" value="" />
611611
</div>

jquery-ui-timepicker-addon.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,10 @@
834834

835835
/*
836836
* Small abstraction to control types
837+
* We can add more, just be sure to follow the pattern: create, options, value
837838
*/
838839
_controls: {
840+
// slider methods
839841
slider: {
840842
create: function(tp_inst, obj, unit, val, min, max, step){
841843
return obj.prop('slide', null).slider({
@@ -864,6 +866,7 @@
864866
return obj.slider('value');
865867
}
866868
},
869+
// select methods
867870
select: {
868871
create: function(tp_inst, obj, unit, val, min, max, step){
869872
var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
@@ -894,8 +897,7 @@
894897
},
895898
options: function(tp_inst, obj, opts, val){
896899
var o = {},
897-
$t = obj.find('select');
898-
900+
$t = obj.children('select');
899901
if(typeof(opts) == 'string'){
900902
if(val == undefined)
901903
return $t.data(opts);
@@ -911,7 +913,7 @@
911913
return $t.val();
912914
}
913915
}
914-
}
916+
} // end _controls
915917

916918
});
917919

0 commit comments

Comments
 (0)