Skip to content

Instantly share code, notes, and snippets.

@akornmeier
Last active February 23, 2016 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akornmeier/50d64ea8349933094c05 to your computer and use it in GitHub Desktop.
Save akornmeier/50d64ea8349933094c05 to your computer and use it in GitHub Desktop.
var $ = window.jQuery;
alert('SUP?');
$('.fab-input-checkbox')
.prop('tabindex', 0)
.attr('role','checkbox')
.on('keydown', function(e) {
var key = e.which;
if(key !== 32) return;
e.preventDefault();
$(e.target).find('input:checkbox').fire('click');
})
.on('change', function(e) {
$(e.target).attr('aria-checked', this.checked);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment