Skip to content

Commit 5fa32a8

Browse files
committed
Fix #22: New configurable property tabindex
1 parent aee7b6c commit 5fa32a8

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGE.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version 1.5.3
22
=============
33
**Date**: 01-Jun-2015
44

5+
- (enh #22): New configurable property `tabindex`.
56
- (enh #23): Better styling to prevent block selection for checkbox container & label.
67

78
version 1.5.2

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ _boolean_, whether the checkbox input is enclosed inside a label. Defaults to `f
137137
#### useNative
138138
_boolean_, whether to display the native checkbox control instead of the advanced styled input generated by the plugin. Defaults to `false`. This property will be applied only if your source element is a checkbox input. Setting it to `true` will allow you to use a `threeState` native checkbox. Note that when you have set `useNative` to `true`, you will lose the advanced styling features offerred by `bootstrap-checkbox-x`.
139139

140+
#### tabindex
141+
_int_, the tabindex property for the checkbox input. Defaults to `1000`. If set to empty or `false`, no tabindex will be assigned.
142+
140143
### Plugin Events
141144
The plugin supports these events:
142145

js/checkbox-x.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
var self = this,
172172
icon = self.getIndicator(),
173173
size = self.options.size,
174-
tab = self.disabled ? '' : ' tabindex="1000"',
174+
tab = self.disabled || !self.options.tabindex ? '' : ' tabindex="' + self.options.tabindex + '"',
175175
css = 'cbx cbx-' + size + (self.disabled ? ' cbx-disabled' : ' cbx-active');
176176
return '<div class="' + css + '"' + tab + '>' + icon + '</div>';
177177
}
@@ -204,7 +204,8 @@
204204
iconNull: '<div class="cbx-icon-null"></div>',
205205
size: 'md',
206206
enclosedLabel: false,
207-
useNative: false
207+
useNative: false,
208+
tabindex: 1000
208209
};
209210

210211
$.fn.checkboxX.Constructor = CheckboxX;

js/checkbox-x.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)