Open keshava-v opened 8 years ago
+1
This issue is pretty old, but tabindex still doesn't seem to work. This is my solution using jQuery:
<label>
<input type="checkbox" name="name" value="off" tabindex="-1" />
Label text.
</label>
$(document).on('ready', function() {
var checkBox = '[type="checkbox"]';
checkBox.iCheck();
checkBox.each(function() {
var _this = $(this);
var parent = _this.parent();
parent.attr('tabindex', 0);
parent.on('focus', function() {
$(this).one('keydown', function(e) {
var space = e.keyCode === 32 || e.which === 32 || e.key === ' ';
var enter = e.keyCode === 13 || e.which === 13 || e.key === 'Enter';
if (space || enter) {
_this.iCheck('toggle');
}
});
});
});
});
when i press tab its not focusing properly .. Any solution for this