var sb = $('#sb') sb.next().attr('tabindex',1).bind('keyup',function(e){ if (e.keyCode == 13){ e.preventDefault(); } });
$('#sb').next().unbind('keydown.switchbutton').bind('keydown.switchbutton', function(e){ if (e.keyCode == 32){ var opts = $('#sb').switchbutton('options'); $('#sb').switchbutton(opts.checked ? 'uncheck' : 'check') }});