You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$('#keyboard').keyboard({visible: function(e,kb,el){if(!kb.$keyboard.find('.ui-keyboard-lock').length){// add lock buttonkb.$keyboard.append('<button class="ui-keyboard-button ui-keyboard-lock ui-state-default ui-corner-all"><span class="ui-icon-unlocked ui-icon"></span></button>');kb.$keyboard.find('.ui-keyboard-lock').click(function(){varlocked=!$(this).find('span').hasClass('ui-icon-locked');// prevent physical keyboard from workingkb.$preview.prop('readonly',locked);// disable all buttonskb.$keyboard.find('.ui-keyboard-button').not('.ui-keyboard-lock').prop('disabled',locked).attr('aria-disabled',locked);$(this).find('span').toggleClass('ui-icon-locked',locked).toggleClass('ui-icon-unlocked',!locked);// stop auto typingif(locked&&kb.typing_options){kb.typing_options.text='';}});}}})// activate the typing extension.addTyping();$('button.open').click(function(){varkeyboard=$('#keyboard').getkeyboard();keyboard.reveal().typeIn('Type on the keyboard',500,function(kb){// do something after text is added (kb = keyboard)// kb.accept(); // close keyboard and accept changes});});
Note: The lock button should use an image instead of jQuery UI's "ui-icon-unlocked" and "ui-icon-locked" class names, as in the demo. This will allow developers to remain independent of the jQuery UI if so desired.
The text was updated successfully, but these errors were encountered:
Add a new key to emulate this demo
Note: The lock button should use an image instead of jQuery UI's "ui-icon-unlocked" and "ui-icon-locked" class names, as in the demo. This will allow developers to remain independent of the jQuery UI if so desired.
The text was updated successfully, but these errors were encountered: