virtual keyboard - enabled - disabled it
Hi.
I'm using a virtual keyboard (http://mottie.github.com/Keyboard/).
I have a checkbox that sould control if the virtual keyboard show be displayed or not.
the thing is that i'm not understand on how to disabled it.
i try to unbind it but doesn't work...
any help?
- <script type="text/javascript">
- $(function () {
- //show login
- $("#showLogin").on({
- click: function () {
- $("#loginFormDiv").toggle("slow");
- }
- });
- $("#cb_showVKey").on('click', CheckIsToShowKey);
- });
- function CheckIsToShowKey(event) {
- //var isCheck = $("#cb_showVKey").is(':checked');
- //alert("ischecked? " + isCheck);
- if ($("#cb_showVKey").is(':checked')) {
- //if checked
- BindKeyboards();
- }
- else {
- //not checked
- UnBindKeyboards();
- }
- }
- function bindVirtualKeyboards() {
- $("#loginForm").delegate(".virtualKeyboardField", "click", BindKeyboards);
- }
- function UnBindKeyboards() {
- $("#loginForm").undelegate(".virtualKeyboardField", "click", BindKeyboards);
- }
- function BindKeyboards() {
- // alert(event.currentTarget.id);
- //alert("xpto");
- $("#loginUserName").keyboard(
- { layout: 'qwerty',
- lockInput: true,
- preventPaste: true
- });
- $("#loginUserPassword").keyboard(
- { layout: 'qwerty',
- lockInput: true,
- preventPaste: true
- });
- }
- $(document).ready(function () {
- $("#loginForm").validate();
- BindKeyboards();
- });
-
- </script>