Home >Web Front-end >JS Tutorial >jQuery on Screen Keyboard Plugin
This jQuery on-screen keyboard plugin provides a customizable virtual keyboard for enhanced website usability. It's similar to Windows' accessibility keyboard, appearing when an input field is clicked.
Implementation:
demo.js
as a starting point.Download & Demo Links: Download Page, Live Demo
jQuery Code Examples:
Basic QWERTY Keyboard:
$(document).ready(function(){ $('.qwerty').keyboard({ layout: 'qwerty' }); });
Numeric Keyboard with Restrictions:
$(document).ready(function(){ $('#num').keyboard({ layout: 'num', restrictInput: true, preventPaste: true, autoAccept: true }); });
Typing Simulator Extension:
$(function() { $('.ui-keyboard-input').addTyping(); });
Keyboard Triggered by Hyperlink:
This example shows how to display the keyboard when a hyperlink is clicked, focusing a hidden input field:
$('.hiddenInput').click(function(){ $('#hidden').trigger('focus'); return false; }); $('#hidden').keyboard({ layout: 'qwerty', position: { of: $('.hiddenInput'), my: 'center top', at: 'center top' } });
Remember to replace placeholder links with the actual download and demo URLs. This revised description provides a clearer and more concise explanation of the plugin's functionality and usage.
The above is the detailed content of jQuery on Screen Keyboard Plugin. For more information, please follow other related articles on the PHP Chinese website!